I have a bunch of simple materials with only one texture in them, and they are saved in an array in my blueprint. I need a way to get the texture/image from the material to show it in a widget.
I have tried connecting the material to MakeSlateBrush but it returns nothing.
In your Material, convert your Texture2D to Texture2D Parameter and give it a name. Then in your Widget Blueprint assign this Material to your Image widget. Finally inside your graph, drag the Image widget and using the below network you can change the texture as you like.
To those of you seeing this post 5 years later, materials are complex and can have lots of textures in the materials. Therefore, there’s no direct way of accessing “the texture.” If your material supports being applied to UI elements, you can grab the material and apply it directly to the UI element/image.
1 Like