private int GetAnimationIndex(AnimationClip clip) { GPUAnimations.Animation[] animations = _animations.GetAnimations(); for (int i = 0; i < animations.Length; i++) { if (animations[i]._name == clip.name) { return(i); } } return(-1); }
private GPUAnimations.Animation GetAnimation(int index) { GPUAnimations animations = _animationTexture.GetAnimations(); GPUAnimations.Animation animation = animations._animations[Mathf.Clamp(index, 0, animations._animations.Length)]; return(animation); }
private GPUAnimations.GPUAnimations.Animation GetAnimation(int index) { return(_animationTexture.GetAnimations()[index]); }