Hi guys, I have a question about animations. I have Player and player has a Point light, a in this point light I change variables in animation (once, only in this start animation):
And after this animation I want to change variables from Point Light in script:
And the problem is the animations overwrite variables in light and size of inner and outer radius dosen’t change. After the start animation I don’t use varaibles from this light in any other animations. I tried wait for end “start aniamtion” like:
There’s probably a way, but you should just control the light entirely from script, it’ll save you a lot of trouble. If you add a property to an animation even a single time, the animator will take control of that property permanently; this is necessary so that your properties can revert to default settings when a new animation is played (at least this is my understanding of it).
I found the thread: [Animator locking animated value even when current state has no curves/keys for that value | Page 3 - Unity Forum]( https://discussions.unity.com/t/645479 page-3)
Also I made it as you said, I create a function which control variables from lights on start, because size of variables in light are connect with player position on Y axis. So I can crate a math propotion for it and I think it’s better because I manage light only in script.
But if somebody knows how fix bug with lock variables by animations and want to share with solution will be great