Changing material in blueprint

Hello Unreal Community,

I have a question regarding changing materials dynamically from blueprints.

I change the material from blueprint as the image above but when the changing initializes the material does not apply. It lefts the character without any texture.

How can I solve this problem?

Thank you!

Try casting to your player character not directly trying to change the mesh material from “get player character” node.

Hey!

Thank you for the reply! So

So you say not from “get player character”. I try to change the material from a HUD blueprint. How can I change the material as you say, directly to my player character? If I try to cast just from the node, it brings the capsule variable.

Thank you!

Hey,i think the material is not correct. you need convert the texture to parameter then create dynamic material instance in your blueprint. in the last,use node set texture parameter(maybe),apply the dynamic material instance to your character.

BTW. If i drag and drop the material on the character, still doesn’t apply. But on other objects, it applies. Other materials on the character works.

So, the same materials that work, i copy and pasted them and it works… but with those tried, it doesn’t work. So I think it’s not the matter of blueprints… correct? If so… what happened with those materiales that didn’t worked?

is it necessary? I mean, it’s an independent material. Not just one applied to the character and then try to modify the main one applied. Is it necessary also for an independent one?

If you want to change the material dynamically,you need do this. And the material is still independent

Make sure Used with Skeletal Mesh is ENABLED.

It’s in material’s details panel.