Another problem following tutorial Variable Get vs Set (character color change)

Hi I’m following this tutorial:

I have this setup:

After compile the character loses its material:

Workaround found in youtube comments.
Use create dynamic material instance (mesh)

Don’t forget to drag drop material on the character so the blueprint can find the material object.
After you made the drag and drop material you need to compile the construction script again.


I didnt saw the tutorial im using an capped 3g connection :frowning: so i not soure what you trying to achieve. also the tutorial might be outdated Ue4 is evolving very Fast

Im not sure but construction script may override all the things you make in it,
So you probably getting the guy color white/grey cause you are geting and setting the material before it being set like in the defaults tab.

If you only want to change the material you can do it without that in the normal blueprint logic using just set when your condition is fullfilled referencing to the material.

but if you want to instance few materials to have them “preloaded” in the construction script you should create an array of materials adding each material to the array with
different index an then you can call and set them easly them easly.

I don’t know. All the change I did was swap out the “create dynamic material instance” to “create dynamic material instance (mesh)” so the first could have some issues? Don’t know.
Note I’m very new to this so I don’t know much other than what I know in the basic tutorials.

Iv been messing around with this for a moment and apparenty theres a probles changing materials on dynamic meshes or at least the default 3rd person mesh.

I did it on a stacionary mesh in the level blueprint and in and in a actor blueprint with a simple static mesh inside works with no problem

This is what i did and it works partially. First create 3 simple materials Blue;Red;Green and then instance each one in the character bp and set it to a variable

Then i just want to change them with a key

And its apparently works but the red material fail to load.( the green one also been faling to load before but iv been changing the order of the colors and in some point it started to load)
So when i want to change to the 3rd its start to look exacty like when the engine load an material i never used in currently loaded level.

PD: Im using 4.7.3 so its maybe already fixed you can try what i did if you have newer version.

I realized that you need at least put the material once manually on the mesh to compile the shaders. then works propertly.