- Home /
Problem with changing Material color using Animator States
I want to animate the color of my player while he is invulnerable but have it return to it's default color when vulnerable.
I have created a "Flashing" Animation with one property: "Mesh Renderer.Material._color" in which the RGB values blend from dark to bright.
I have created two States in the Controller window. A blank one for the default state and a flashing state which targets the "Flashing" animation, or motion.
The flashing anim works like a dream, but the player's default colors just turn into a flat red. I have tried creating another animation called "Normal" with no color information, and then targeting that with the default state but it doesn't work. I feel like I'm missing something really simple here, but there doesn't seem to be any info on this.
Your answer
![](https://koobas.hobune.stream/wayback/20220612090730im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
animator playing wrong animation for a couple seconds then goes to the correct animation 1 Answer
How create many animated objects without making for each animator controller manually ? 0 Answers
Color looks different in build than in editor - C# 0 Answers
Perfermance improvement when updating hundreds of thousands particles (objects) at runtime 3 Answers
how to change material color direct from the material 3 Answers