Dynamic Materials doesn't work after calling SetMaterial()
Dynamic materials work perfectly as long as I create them in PostInitializeComponents or in the constructor. But if I at some point try to execute the same bit of code during gameplay it stops working.
Here's what I have:
if I omitt the "GetMesh()->SetMaterial()" it works fine as it did before, but I desperately need to be able to set the materials. Any idea how to fix this?
PS: This isn't the entire code as it would bloat the entire page, but I call SetCharacterColor_Multi elsewhere, which works fine as long as I haven't called SetMaterial beforehand.
this tidbit of code inside MaterialInstance.cpp made sure that my new parameter was never getting set. It compared my old value to my new one, and found no differences. I now first change the value to a random one, and then reset it to what I want it to be - this forces the material to update its' cached parameter references.
answered Mar 05 '15 at 03:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here