Problem with linking static mesh as reference in UMG.

As said in the title, i’m currently having trouble with linking a static mesh into the UMG blueprint. What i’m trying to achieve is to make a color selection menu for the object and to change it’s color.

I have no problem creating the menu and everything seems to be working fine until i tried to define the object that the color change is applied to.

Here’s my blueprints :


As seen in this widget blueprint, when i tried to compile it, an error occurred and i have no idea why. When i click on the static mesh component in the compiler results, it successfully links to the static mesh in the game.


This is the widget blueprint for the menu. This is working fine without any problems.


This is the blueprint for the particular static mesh itself. This is for detection of a key event when near the object. Once i click on a button, the menu will appear. There are no problems with this either.


This is how it appear in the game.

As seen through all the printscreens, the problem lies on the first 1 printscreen where i can’t set the object to be defined as the object the color change is applied to. How do i fix this?

Thanks in advance.

I suppose that the trouble comes from your reference. You need to set it once you have created your widget (drag a “set staticmesh component” from return value of create widget and set it with the component in blueprint.)

Thanks for the reply. I have tried what you have suggested and change my blueprint correspondingly. After i did that, no error occured but the material of my static mesh did not change. What am i doing wrong?


The variable color box, in your widget is a generic reference to your type of blueprint, not a specific one. You need to “set” it. To do that, from the "return value of your “create widget” drag a “set color box” and set it with a “self”.

It’s finally working!! TQ SO MUCH!!!

You are welcome ^^