Create a fBrush for Slate

FSlateBrush is normal struct just make one, but remember it needs to be in memory all the time when it’s used. So declere FSlateBrush in header file and set it up in initiation, best would be if you do that with FSlateBrush constructor:

there also some FSlateBrush template structs with are easier to setup specific things like just color or just image:

FSlateBrush is also blueprint compatible (as it’s used in UMG), if you make it a property you can normally set image and color in property editor.

By convention you should hold any brushes in slate style set (but they work from anywhere so you don’t need to do that if you only want one or few brush), here you have tutorial about slate style set:

I could not find any brush set example so i dig one from engine source code:
https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/2D/Paper2D/Source/Paper2DEditor/Private/PaperStyle.cpp