Can't figure out MaterialEx:setTexture()
Posted: Wed Dec 31, 2014 7:24 am
MaterialEx:setTexture(string, string)
There is a crash if the second parameter is not a valid texture asset path, so it must be the texture that will replace the existing one. So I would assume that the first parameter is the name of the texture slot to change. But I've tried everything I can think of for the first parameter and nothing has gotten a result:
"diffuseMap"
"diffuse"
"dif"
"normalMap"
"normal"
etc.
The material still shows its old textures afterwards. Does anyone know what I can enter to actually change a visible texture?
There is a crash if the second parameter is not a valid texture asset path, so it must be the texture that will replace the existing one. So I would assume that the first parameter is the name of the texture slot to change. But I've tried everything I can think of for the first parameter and nothing has gotten a result:
"diffuseMap"
"diffuse"
"dif"
"normalMap"
"normal"
etc.
The material still shows its old textures afterwards. Does anyone know what I can enter to actually change a visible texture?