How to link static mesh into widget blueprint?

Been having this problem and i couldn’t solve it. What i intended to do is to change the material via the widget blueprint but i am unable to bring the static mesh actor into the blueprint. How do i solve this??


How are you bringing the widget up?

If you are clicking on an actor that brings up the widget; create an actor variable in the MenuCC widget. Then,In the Actor BP, after you create the MenuCC widget, cast to MenuCC, and set the actor variable with a reference to it self, then add to viewport.

Hope this helps!

There’s no problem bringing the widget up. It’s already done. My problem is just bringing the mesh actor into the widget blueprint to define the mesh that will be undergoing a material change.


I understand that the widget is already on screen, but how was it put there? Is it placed when the level starts? Was it done by clicking an actor? Is it brought up on a button press? This can effect how you do things.

If the widget is always up you should set a reference to it in your character/pawn so that you can access it easily.

Now the question is, what actor are you trying to reference? Is it the player? An actor somewhere else? If so, how are you choosing that actor? Are you clicking on it, looking at it with a trace, overlapping it, randomly selecting acotors in an array? However, that is done, on that selection event, you need to send the actor to the widget using a cast to MenuCC and set the desired var.

Oh sorry. I misunderstood what you said. The widget opens when i click/press on the object. It is done via the object blueprint (eventgraph).
I’m trying to reference the object as i’m trying to change it’s material via selection menu (widget).

Therefore i’m currently stuck at defining (referencing) the same object into the widget blueprint (pointed with the red arrow in the SS). I have no clue how to bring it into the widget blueprint.

I hope this makes my question clearer.

Bump… need help…

Sunny, it is just like I said before.

Here are some bps. Very simple. Click button, change var in actor and call function in actor. Better to do the changing in the actor blueprint. I put a delay before removing it but it is unnecessary.


Here is the actor bp. On click, create widget, cast to that widget type that has a place for the actor to be stored. Store var in the widget for use when a button is clicked and add the widget to the viewport.

Change color function is called from the widget after it set the current material var to the desired color.