Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseSamples 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 ();