- Home /
Animator event at the end of transition.
Hello. What would be the best way to make an Event when a a transition is done transitioning into the next state?
Answer by Saandji · Apr 24, 2017 at 07:52 AM
This is super old thread, but as far as i can see, "Add Behaviour" in Animator can solve this problem. That will create the script for your state, which has several methods handy for such requirements.
Check this out: https://docs.unity3d.com/ScriptReference/StateMachineBehaviour.html
Cheers
It still might look tricky. For this particular case OnStateExit method of State$$anonymous$$achineBehaviour should be used.
Answer by sandeepsmartest · Jun 15, 2015 at 07:33 AM
Hi, First of all Create a Script which should have the method that should trigger at the end of the animation. For Example:
Public Void OnAnimationEnd()
{
Debug.Log("Animation Just Completed");
}
Attach this script to the gameobject for which animation is attached.Now select the gameobject for which animator/animation is attached and press Ctrl+6. A window opens with the animation that is being attached for the selected gameobject.Now,Follow the attached screenshots. This holds good if the animation is made in unity.If you want to trigger events for the animations that were created in Maya/3dsMax,import the model,select the model in project,check inspector for animations. Check these links:link 1,link 2
Does not help at all. $$anonymous$$y question was not how to make an event at the end of an animation - I know how that is done. I am greatly disappointed that someone either from the staff or other users(if one can do that) deleted most of my question, and edited my question into something, that not only I did not ask, but also in a grammatically incorrect sentence.
I will solve the problem by myself, thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220613201006im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is possible to choose the time when a state changes, during a transition in Animator? 0 Answers
Delay and Twitching when using an empty state as Transition between multiple other states 0 Answers
Animator won't let me add transitions 1 Answer
i am trying to animate a character model and am having issue with floating characters. 0 Answers