How to create a SlateBoxBrush

Hi,

I am trying to create a boxbrush in slate. But I can’t find anything on creating the brush.

How to link the images and how to set which image is which margin. Even an example on creating a slate brush will be enough for me.

If you search for BOX_BRUSH you will find 700 examples, give of take a hundred :wink:

Notice that every set of resources tends to define its own macro for BOX_BRUSH, which determines in which locations on disk to search for the files.

We do not think this is a great system, especially not for game UIs. In UMG you can import images directly into the Content Browser and create brushes from them by using the editor.

Please say its coming soon :slight_smile:

You can do this right now:

  1. Import image into content browser
  2. Right-click → Create slate Brush
  3. Reference brush via an instance of FSlateGameResources

Note: the slate brush editor is a property panel with a lot of collapsed fields. You want to expand all of them, especially the preview field. This is being worked on, but it isn’t anywhere near what we want it to be yet.

I think it might be in 4.2.1 but you might have to go and create a new slate brush and then assign the UTexture asset to it (i.e. there might not be a Right_Click->CreateSlateBrush option)

Is this 4.2.1 or 4.3? I had internet connection problems so have not updated yet.

Thanks help me a lot. I also didn’t see we could create slate styles that way. Save me a lot from trouble.