public void SetAnimationClip(string name) { animationClip = skinningData.AnimationClips[name]; animationPlayer.StartClip(animationClip); }
/// <summary> /// Starts decoding the specified animation clip /// </summary> public void StartClip(AnimationClip clip) { if (clip == null) { throw new ArgumentNullException("clip"); } currentClipValue = clip; currentTimeValue = clip.Keyframes[0].Time; currentKeyframe = 0; // Initialize bone transforms to the bind pose. skinningDataValue.BindPose.CopyTo(boneTransforms, 0); }