void StartLoadingAnimation(string anim_Loading) { if (CachedLegacyAnimation != null) { CachedLegacyAnimation.Play(anim_Loading); } else { Debug.LogWarning("Loading button: " + name + " has no attached animation."); } }
public void PlayAnimation(string animationName, bool continueFromCurrentTime) { if (IsPlayingAnimation(animationName)) { } else { currentPlayingClipName = animationName; CachedLegacyAnimation.clip = CachedLegacyAnimation.GetClip(animationName); CachedLegacyAnimation.Play(animationName); } if (!continueFromCurrentTime) { CachedLegacyAnimation[animationName].normalizedTime = 0f; lastAnimationUpdateTime = 0f; } }