# EndSampling()

> Finish the sampling of the animation clip.

## Definition

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

```csharp
public static void EndSampling()
```

### Remarks

[AnimationMode.EndSampling](/engine/6000.0/script-reference/unityeditor/animationmode/endsampling.md) is called after [AnimationMode.SampleAnimationClip](/engine/6000.0/script-reference/unityeditor/animationmode/sampleanimationclip.md) returns. This function must be called immediately following [AnimationMode.SampleAnimationClip](/engine/6000.0/script-reference/unityeditor/animationmode/sampleanimationclip.md). See the script example on the [AnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode.md) page to see this behaviour.
