Creating a widget for save slots

While the bulk of the work in this section will be actually implementing the loading and saving of various actor classes, we do of course need an interface to display this to players, and that is what we will do first. Our next step then is a UMG widget that we can bring up with buttons to facilitate this. So, back in the editor, we need a widget that has some touch-points back to C++ code so we can do the bulk of the work. To simplify this, we'll make a new C++ class based on UUserWidget, call it MainMenuWidget, and add the class to the UI folder. Then, like before, we make a new blueprint asset and we will add 4 buttons to that in its design, like so:

Notice we set its initial visibility to Hidden, and ...

Get Mastering Game Development with Unreal Engine 4 - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.