- Home /
Can you set the state of the animator on enabled = true?
Hello,
is there a way to set the state of the animator on enabled = true or when the game object is set to active? So normally you have the default state that is always highlighted orange. Lets say I have 4 other states like in the picture. The transitions are only connected between themselves and to the default, no transitions connected to the other states. If I at any point I set the animator to .enabled = false; and then want to reactivate it. Is there a way to set the state in which it will be before reactivating? Something like changing or setting the default state. The way I've been trying sorta works but, when I reactivate the animator it will go to the state I want immediately, so I see movement from the previous state in which it was in before deactivating, to the new state which I set before reactivating. What I really want, is for it to just be set in the new state upon activation like it was the default itself. I am coding in C#. I have looked through the lists of properties and public methods in the Unity documentation and could not see quit what I was looking for unless I was misunderstanding some that I read about. I hope this makes sense. P.S. wasn't sure to post this in default or help room. Than you.
Your answer
Follow this Question
Related Questions
Animator slow transitions and animations playing twice. How to set up transitions correctly? 0 Answers
How to make a transition animation, intermediate animation between two main states 0 Answers
Multiple Cars not working 1 Answer
Automatically change animation only if it is not looping? 0 Answers
Distribute terrain in zones 3 Answers