Changing a material's colors anywhere else besides the Update function has no effect,Changing Material's color works on Update but not on another method
I have a function called CreateColor
that simply takes an hex string (like "ff00ff" = pink) and returns a new Color object that represents that color. When I call primaryMaterial.SetColor("_Color", CreateColor("ff00ff"));
on the Update
method everything works as expected and primaryMaterial
indeed becomes pink. However, when I call the same piece of code outside of Update
it has no effect. I'll paste the current code that I have just in case it is of any help: https://pastebin.com/SSsqawQj
Your answer
Follow this Question
Related Questions
How do i remove colored circles on materials? 0 Answers
Texture scroll stop when color change 1 Answer
How to only access one object in array if it's index is 1 0 Answers
Can I use MaterialPropertyBlock to set properties per material instead of per renderer? 0 Answers
Changing color in in runtime to a cube 0 Answers