The previous recipe used the FCanvas
API to draw to the screen. However, FCanvas
suffers from a number of limitations, for example, animations are difficult to implement, and drawing graphics on the screen involves creating textures or materials. FCanvas
also doesn't implement anything in the way of widgets or window controls, making data entry or other forms of user input more complex than it needs to be. This recipe will show you how to begin creating HUD elements onscreen using Slate, which provides a number of built-in controls.
Add Slate
and SlateCore
to your module's dependencies if you haven't done so already (see recipe Drawing using Canvas for how to do this).