Reputation: 43
I'm working on 2D game in unity and the game has several animation clip like : Idle, Idle Stomach, Figure and etc. Also I have two section in my scene: 1- home 2-character
My default animation is "Idle" and I use SetTrigger to run the specific animation clip. Animation and trigger work fine but when I trigger from "Idle" to another animation like "Figure" and switch between home and character (character section false -> home section true -> home section false, character section true) , my Idle animation blend with another clip witch it has trigger before and it has some frame from figure or stomach animation.
How can I reset animator like when scene load? or reset Idle clip for example?
I try these separately :
but didn't work.
Upvotes: 3
Views: 1885
Reputation: 1
You could try the exit node in the animator, doing this will automatically make the animator go the default animation clip.
https://i.sstatic.net/XigM7.png
Add this to layer 0 and use Play("Exit", 0);
Upvotes: 0