- Home /
Help with animator controllers
I have multiple states in an animator, and i need to change the layer default state under if conditions. How can i set a state as layer default state with script?
Answer by FlaSh-G · Jan 01, 2018 at 06:33 PM
Afaik you can't. The question is: Why would you want to? The default state is the state the animator goes to when the component is initialized. Before that happened, the component doesn't exist, so you cannot do anything with it. And after that happened, it's too late, and the component already needed the default state.
You can probably just switch to any other state after initialization and never go to the default state again if you wish.
Your answer
Follow this Question
Related Questions
why I have to anim.getComponent in update() function when I had done in Start () function 2 Answers
Is there a new retargetting system for the animation in 5.5? 1 Answer
Why when creating new animator controller for the character the character is not walking right ? 0 Answers
How can i check if animation has finished playing if the object have no animator attached ? 1 Answer
Armature bone unable to rotate while animation playing 1 Answer