AnimationMode.SampleAnimationClip
static function SampleAnimationClip(gameObject: GameObject, clip: AnimationClip, time: float): void;
Description

Samples an AnimationClip on the object and also records any modified properties in AnimationMode.

This function must always be surrounded by AnimationMode.BeginSample and AnimationMode.EndSample. When a property is no longer sampled (through SampleAnimationClip or AddPropertyModification) between BeginSample and EndSample it will automatically revert to the original value when EndSample is called.
AnimationMode.BeginSample ();
AnimationMode.SampleAnimationClip (gameObject, clip, 0.3F);
AnimationMode.EndSample ();