# SampleAnimationClip(GameObject, AnimationClip, float)

> Samples the AnimationClip for the GameObject and also records modified properties when in Animation mode.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static void SampleAnimationClip(GameObject gameObject, AnimationClip clip, float time)
```

### Parameters

**** (\[GameObject]\(/engine/6000.6/script-reference/unityengine/gameobject)): The root [GameObject](/engine/6000.6/script-reference/unityengine/gameobject.md) for the animation.**** (\[AnimationClip]\(/engine/6000.6/script-reference/unityengine/animationclip)): The [AnimationClip](/engine/6000.6/script-reference/unityengine/animationclip.md) to sample.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The time at which to sample.

### Remarks

If this method returns true, you can use [AnimationMode.SampleAnimationClip](/engine/6000.6/script-reference/unityeditor/animationmode/sampleanimationclip.md) to animate the attached object.

**Note:** The script example for [AnimationMode](/engine/6000.6/script-reference/unityeditor/animationmode.md) demonstrates how to use [AnimationMode.InAnimationMode](/engine/6000.6/script-reference/unityeditor/animationmode/inanimationmode.md).
