HUD and Material Instance

Thanks for the help. It worked perfectly for what I needed. Only one observation, you don’t need to use the Cast To block.

Hey man, thanks for the help but the method below from navid100 worked better for my situation.

Hello everyone.

I’m having a problem trying to use HUD and material instance. Here’s the explanation:

I have a mesh at my level which has a material instance of a material. This material has the emissive color as a parameter so I can change it at the instance.
My HUD creates a widget that contains a few buttons. What I want to do is click on one of these buttons and change the emissive color parameter to zero. Here is the code for the creation of the widget inside the HUD:

In another part of the code I used this to change the material of a mesh:

How can I access the material parameter from inside the widget code?

Thanks for the help!

Hello SergioAAV,

Can you use “Set Vector Parameter” node. For this https://answers.unrealengine.com/questions/657471/get-color-of-texture-sample.html

Hi,

Take a look at my approach;

Sample material graph

I’ve created the material instance inside the construction script for this example.

Inside widget event graph

I’ve tried this approach and worked. One thing to note is that it affects all the blueprints of the same class in your level.

Regards,