So I have this semi-rounded box as an image in UMG.
And then I want this element to have a gradient so I made a user interface material.
But when applied, my image just becomes a box without rounding. Is there a setting I’m missing?
So I have this semi-rounded box as an image in UMG.
And then I want this element to have a gradient so I made a user interface material.
But when applied, my image just becomes a box without rounding. Is there a setting I’m missing?
HI. Did you ever find a solution for this?
Did you ever find a solution either? D:
I believe this happens because the “Draw as Rounded Box” uses it’s own material to round the edges. So when you use a material as the image, it doesn’t work.
A workaround is to round the corners in the material itself. You can do this by setting the material to transparent blend mode and using the Generate Round Rect node for opacity.
Ok, I’ll look into that thanks.
Yeah, solving it in the material was the way to go. I ended up creating a solution based off the setup in free Epic Games Project UI Material Lab. This approach uses SDFs to achieve the look. I then created a widget with exposed parameters in its preconstruct so that can edit them on the fly.
Here is my final setup for the material if anyone wants to use it: