# Is it possible to load a texture for a brush by a string name?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-load-a-texture-for-a-brush-by-a-string-name/370449>\
**Category:** UI\
**Tags:** fstring, unreal-engine, brush, Widget, Blueprint, question\
**Created:** [September 14, 2016, 6:03pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-load-a-texture-for-a-brush-by-a-string-name/370449 "2016-09-14T18:03:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![irdc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@irdc](https://forums.unrealengine.com/u/irdc)\
**Post date:** [September 14, 2016, 6:03pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-load-a-texture-for-a-brush-by-a-string-name/370449/1 "2016-09-14T18:03:08Z")

</div>

Hello! I can’t seem to find any proper way to use a string as the name of a texture in order to dynamically load the texture for a button widget. I have a blueprints function that formats a series of button widgets by editing the brushes:

![106980-brush.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/e/c6e10df395f4f2ec6c8f6884da5003cc8c5d13be.png)

Here, the brush texture is using the “Acid\_Arrow” texture which has been properly imported into Unreal. What I’d like to do is make it so I could select a texture dynamically. Something like:

![106982-brush2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/e/76e37284e9b915ebc0a7532046430a4989222512.png)

This is conceptual, of course, but it should be pretty obvious what I’d like to do. I understand Make SlateBrush is looking for an object reference. Are textures objects at this point? Not really sure …

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![JayWebb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JayWebb](https://forums.unrealengine.com/u/JayWebb)\
**Post date:** [September 15, 2016, 9:44am UTC](https://forums.unrealengine.com/t/is-it-possible-to-load-a-texture-for-a-brush-by-a-string-name/370449/2 "2016-09-15T09:44:31Z")

</div>

You could store an array of images, check if the string name = the correct name. If true set the index of the array for the image desired.

Hope this helps!

 ![107081-slatebrush.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/d/4ad4baca8abdb464a4d6529456ccd572e942e512.jpeg)

---

<div class="post-metadata">

**Author:** ![Deemk0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deemk0](https://forums.unrealengine.com/u/Deemk0)\
**Post date:** [September 15, 2016, 1:05pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-load-a-texture-for-a-brush-by-a-string-name/370449/3 "2016-09-15T13:05:56Z")

</div>

or use the structure insted of array and do the same thing.
