// Start is called before the first frame update void Start() { m_AnimationFinished = new UnityEvent(); AnimationData.Generate(); m_animator = GetComponent <Animator>(); m_aniManager = GetComponent <AnimationPlayManager>(); m_aniManager.RegisteAnimation(NameOfAnimation, this); m_aniOver = new AnimationFinished(m_animator, NameInAnimationCtrl, m_AnimationFinished); m_AnimationFinished.AddListener(_animationFinished); m_bNameInCtrlValid = NameInAnimationCtrl.Length > 0; }