# 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 <a href="#assetbrush-addingslatebrushasset" id="assetbrush-addingslatebrushasset"></a>

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.

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2Ft9BMQzx8HNrhr83yMAei%2Fimage.png?alt=media&#x26;token=d97af891-1dfe-472e-866b-bdca08e1bf44" alt=""></div>

### Configuration Slate Brush <a href="#assetbrush-configurationslatebrush" id="assetbrush-configurationslatebrush"></a>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FwcufyJWon9iieQIkH3XS%2Fimage.png?alt=media&#x26;token=97e37383-8b69-497e-962b-02ea2456f05e" alt=""></div>

### Exporting Slate Brush Asset <a href="#assetbrush-exportingslatebrushasset" id="assetbrush-exportingslatebrushasset"></a>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FwKhM8ULcTJAOFWHPkc8i%2Fimage.png?alt=media&#x26;token=ebce3cad-918b-4483-8d70-8600134b5be4" alt=""></div>

### Creating Widget Blueprint <a href="#assetbrush-creatingwidgetblueprint" id="assetbrush-creatingwidgetblueprint"></a>

* 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.

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2Fx0tP2ILxD4TSzbjXOkDH%2Fimage.png?alt=media&#x26;token=ffa87255-ab19-46e8-a08a-8eb928cd0b51" alt=""></div>

### Changing Parent Class of Widget Blueprint and Exporting <a href="#assetbrush-changingparentclassofwidgetblueprintandexporting" id="assetbrush-changingparentclassofwidgetblueprintandexporting"></a>

* Open up Widget Blueprint.&#x20;
* Click Graph Tab.
* Open the Class Settings.&#x20;
* Change "Parent Class" as ZDRealityWidget from "Details Panel".

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FG8DTBG0iqQVZYgqVDLWa%2Fimage.png?alt=media&#x26;token=26b597bf-3ff3-4257-b16e-07b518c9c120" alt=""></div>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FR7qlFTDCiV2I4955fFS5%2Fimage.png?alt=media&#x26;token=47ce5244-1c5b-424f-b1ed-67bbfbe6b3ca" alt=""></div>

### Adding component to Widget Blueprint <a href="#assetbrush-addingcomponenttowidgetblueprint" id="assetbrush-addingcomponenttowidgetblueprint"></a>

* 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.

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2F4vWK6LAjZJTNNaZ9uND7%2Fimage.png?alt=media&#x26;token=c2836e42-7fed-4e39-886c-664586f98c37" alt=""></div>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FCjO1MnBFaKtIT18ADMWo%2Fimage.png?alt=media&#x26;token=bb3a0951-bd2a-4114-bf91-8f9dbc99ef45" alt=""></div>

### Adding Custom Event <a href="#assetbrush-addingcustomevent" id="assetbrush-addingcustomevent"></a>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2F8soMKZv4KMQBzKmM2Iub%2Fimage.png?alt=media&#x26;token=80907f36-55bb-452c-b113-f78263e8cdb9" alt=""></div>

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

### Exporting Custom Event <a href="#assetbrush-exportingcustomevent" id="assetbrush-exportingcustomevent"></a>

* Open Class Defaults of Widget Blueprint.

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FDtGU9sQ1DPWCPRgDOr1e%2Fimage.png?alt=media&#x26;token=1fd31cf6-678f-426a-8c20-8a40516d4e9d" alt=""></div>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FXIgqsTBsOyQ7gnfnNuuG%2Fimage.png?alt=media&#x26;token=00d2740f-3d60-4bf7-8070-0f2a374edf67" alt=""></div>

### Using Asset Brush in Reality Setup <a href="#assetbrush-usingassetbrushinrealitysetup" id="assetbrush-usingassetbrushinrealitysetup"></a>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2F3qulJ0VshJVJahCvN5Iu%2Fimage.png?alt=media&#x26;token=2c872708-d030-466e-a158-6be78874e38f" alt=""></div>

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

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2F2c0xWL1BhZaX0iz0Lcr8%2Fimage.png?alt=media&#x26;token=0a35ea93-3181-499e-8509-806d8079dc14" alt=""></div>

* Connect nodes as shown in the below image.&#x20;

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FBEGrLyw2M91ZEf4YIx53%2Fimage.png?alt=media&#x26;token=a8149fe5-cf30-41ed-9195-2098ef76c4b3" alt=""></div>

### Result <a href="#assetbrush-result" id="assetbrush-result"></a>

* Click UMGRenderer Node and execute SetMyLogo function.

<div align="left"><img src="https://3682414700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEesbrFT840vDc0axDrZ6%2Fuploads%2FPEGqpN4MBYTNOyt9EXxh%2Fimage.png?alt=media&#x26;token=616d6ef4-24b0-4158-93ab-75b4fd16da3f" alt=""></div>
