public bool HasAnimationClip(string clipName) { if (AnimationData == null) { throw new Exception("The Animation Data is not set"); } return(AnimationData.HasClip(clipName)); }
//bool callbackAdded = false; protected virtual void OnEnable() { if (autoPlay && AnimationData.HasClip(autoPlayClip)) { PlayAnimation(autoPlayClip); onAnimationDone += s => OnClipFinish.DoneWithObject(this); } }