Material change at runtime

Hi, trying to get my players materiel to change and keyboard pressed… Maybe I don’t understand how to node works but everything I try gives me error. Am I using it wrong?

You need to use set material slot node. If the object uses material slot 1 in Blender, and you would like to change the material of that object at run-time, you need to set the required material to slot 0 of the object.

So, if the object uses slot 2 in blender, then to change material you need to set the required material at slot 1 of that object.

It also has a few errors in the console when you add the node. And there is no documentation and is quite counter-intuitive. I will probably fix these in this week-end

An example file
setMaterialExample.blend (896.6 KB)

1 Like

Thanks… I just forgot blender slots was a thing…… I was trying to use 2 materials on the same object😂

1 Like