I have an animated sprite that I’d like to change SpriteRenderer.color for in code. My code is fine, and will work when the animator component on the object in question is turned off. However, when the animator is on, the sprite’s color gets reset to default white every frame for some reason. My animations aren’t doing anything to the SpriteRenderer.Color, but it’s still being changed. Does anyone have any suggestions as to why this might be happening?
Update: I have one animation that changes the color of the sprite. This animation is not the one playing when i attempt to change the color from code, but if it is in my animator tree (even if it’s not connected to anything), the sprite’s color will be modified by the animator. However, if I delete this animation or the color change in this animation, everything works fine. I don’t understand why an unused animation that modifies SpriteRenderer.color being in my animator apparently makes every animation change SpriteRenderer.color.