I must be missing something simple. I create a very simple user widget. Has a canvas and an image. I created a brush, set a material on it and assigned the brush to the image.
It doesn’t work. My material does not show up. I’ve read tutorials, watched youtube videos. What the tutorials and youtube videos do simply doesn’t work for me.
I tried using a binding on the brush and that doesn’t work either. What am I missing?
I tried removing the material. So just binding a brush variable on an Image widget doesn’t work.
If I remove the binding, I can change the settings on the brush in the image widget and that updates, so there’s nothing overlapping. There’s also nothing connected in any of the graphs.
I’m using a material instance and want to set the values. I’m not changing them after construction, so I was able to get it to work with “Set Brush from Material” in the construction script.
But bindings still don’t work for me. Guess I’ll have to work around that from now on.
I see, well here is my setup to change the properties of the brush with a slider.
I turned this into a parameter called color:
To change this material and properties it needs to be a dynamic material. So I run the node called: Create Dynamic Material Instance and make it into a variable. I then use Set Brush to set the new material on the Image brush.
Binding is mostly used to bind for the values that you see in the appearance. You can create your own structs which can receive a binding, but this is how you would bind a slider and change a value with it.
Anything set in the return node is completely ignored. I’m just trying to set the color to green. Doesn’t work. Doesn’t work in game either. I can connect variables or whatnot and none of it works.
Yeah, it works when I add a slider. I don’t even need to use the slider. Just having it displayed makes the return node work. This has got to be a bug or I have a bad build or something.
It’s not solved. I’m getting inconsistent behaviour. I removed the slider and it still works. But the other widget doesn’t. Anyhow, I’ll just use the setup code I have above. That seems to work fine.
Oh, and even when the binding works, it doesn’t update in the editor. Maybe that’s just how it works. Dunno.