# BeginSampling()

> Initialise the start of the animation clip sampling.

## Definition

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

```csharp
public static void BeginSampling()
```

### Remarks

[AnimationMode.BeginSampling](/engine/6000.7/script-reference/unityeditor/animationmode/beginsampling.md) arranges for the ::SampleAnimationClip to operate correctly.  Not calling [AnimationMode.BeginSampling](/engine/6000.7/script-reference/unityeditor/animationmode/beginsampling.md) prevents the animation data to be sampled.  This function must be called immediately before the [AnimationMode.SampleAnimationClip](/engine/6000.7/script-reference/unityeditor/animationmode/sampleanimationclip.md) is called.  See the script example on the [AnimationMode](/engine/6000.7/script-reference/unityeditor/animationmode.md) page to see this behaviour.
