How to replace an Animation State in Animator, without rebuilding all the transitions?
All I want to do is select one of the states here (aka an animation) and replace it with another animation without having to rebuild the transitions in/out of it. It would surprise me if this were not possible, but I can't seem to intuitively find any option in the editor ui, nor have I been able to find a way via Googling and Unity Answers.
Thanks. (And yes, I know this particular animator state machine is fairly simple, so its not a lot of work to re-do transitions, but I'd like to know for other more complex Animator SMs in other projects).
Once a state is selected, you are able to rename it and assign the animation clip you want. Do you need something more?
How? I select for example "$$anonymous$$ainCamera_PlayTop" and want to replace it with another animation. I right-click and see no Rename option in the contextual menu. Is there another way?
Answer by Hellium · Oct 26, 2017 at 05:37 AM
When you click on a state, the inspector shows information about it.
Click on the the top-most input field and type the new name of the state and hit the
Enter
key.In your
Project
window, you can drag the AnimationClip you want and drop it into theMotion
field in the Animator (or click in the little circle to open the asset finder)
OH jeez. Never noticed that field in the inspector!! Thank you!
Your answer
Follow this Question
Related Questions
Getting Condition Value From Animator Transition in Script? 1 Answer
How do I know what animation I can transit to in the animator, from my current animation? 0 Answers
Why StateMachineBehaviour not calling OnStateExit when doing animator.Crossfade through code? 0 Answers
How do you make sure that when you land on an object, an animation starts? 0 Answers