文档

Unity Engine

Unity Engine

SampleAnimationClip(GameObject, AnimationClip, float)

Samples the AnimationClip for the GameObject and also records modified properties when in Animation mode.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static void SampleAnimationClip(GameObject gameObject, AnimationClip clip, float time)

Parameters

gameObject

The root GameObject for the animation.

The AnimationClip to sample.

time

The time at which to sample.

Remarks

If this method returns true, you can use AnimationMode.SampleAnimationClip to animate the attached object.
Note: The script example for AnimationMode demonstrates how to use AnimationMode.InAnimationMode.