Skip to main content
Version: Reality 4.27

Asset Brush

The Asset Brush node allows you to use the "Slate Brush" asset created in the Reality Editor in Reality Setup. AssetBrush node has a single output and you only can set it to SlateBrush variable.

Adding Slate Brush Asset

Open Reality Editor and create a Slate Brush from ADD NEW → User Interface → Slate Brush or access it via right click in empty area of content browser and choose it from component menu.

Configuration Slate Brush

  • Open SlateBrush asset and configure it.
  • Save changes.

Exporting Slate Brush Asset

  • Open project settings from.
  • Open Exports tab which under Reality title.

Creating Widget Blueprint

  • Open Reality Editor and create a Slate Brush from ADD NEW → User Interface → Widget Blueprint or access it via right click in empty area of content browser and choose it from component menu.

Changing Parent Class of Widget Blueprint and Exporting

  • Open up Widget Blueprint.
  • Click Graph Tab.
  • Open the Class Settings.
  • Change "Parent Class" as ZDRealityWidget from "Details Panel".

  • Open project settings from .
  • Open Exports tab which under Reality title.
  • Add "MyWidgetBlueprint" to Widget Class

Adding component to Widget Blueprint

  • For this tutorial we will add an image component and we will set Asset Brush node to the brush of image.
  • Add an Image component from Palette under Common Section.

  • Open Graph tab.
  • Add a slate brush variable. Click eye icon to make it public.
  • Your variables should be looking like the below image.

Adding Custom Event

  • Add a custom event to the graph. And set the script as shown in the below image.

This event will set "MySlateVariable" to brush of "MyImage" variable.

Exporting Custom Event

  • Open Class Defaults of Widget Blueprint.

  • Add "SetMyLogo" event to "Reality Events" under Details.

Using Asset Brush in Reality Setup

  • Click PLAY button of editor.
  • Open Reality Setup Application.
  • Add ASSET BRUSH from Create → UMG
  • Set Brush of "AssetBrush" class.

  • Add UMGRENDERER from Create → UMG → UMG Renderer.
  • Set UMGRENDERER class.

  • Connect nodes as shown in the below image.

Result

  • Click UMGRenderer Node and execute SetMyLogo function.