Cannot set image on UMG widget at runtime?

No matter what I try, I am not having any luck setting an image on my buttons created at runtime.

I have tried make brush into set brush, set brush from texture, set brush resource to texture, all of which are yielding a blank image at runtime. The problem seems to be coming from the brush used to set the image. As soon as I set a binding on this brush, the default button image does not show up at runtime even if all nodes relating to the brush in the button creation function below are erased.

What am I missing here?

262661-untitled-2.jpg

1 Like

Binding will override anything always. Setting up a bind is akin to setting something during tick.

So, you may very well be creating your texture on construct, but that is the one and only time you will ever see it because your bind will instantaneously kick in the moment you have finished the widget construction.

Since your bind doesn’t have anything hooked up in the return node, it will always set it to blank even if at some point after the create you set it to something else.

You should pick one of the two methods (set via bind or set via construct) not use both.

For some reason I thought I needed the binding in order to access the image as a variable. Removing the binding was the trick! Thanks for your help.