Changing the Materials using UMG Buttons

You’re on the right track!

I’ve created a simple widget to demonstrate the concept I was mentioning, this widget has 2 simple buttons, I labeled them M1 and M2. M1 will set the material banana bark to the cone, M2 will set banana leaf to the cone. As well as a variable that holds my cone reference.

When I add the widget to the viewport, I pass it my cone reference.

In my widget I will add the onClicked event for my buttons, each button will be responsible for another material.

29556-example.gif

As you can see, when I click the cone, it brings up the widget, then clicking the buttons will change the material accordingly!

Hope it helps! :slight_smile: