---
title: Clone()
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/weightmasksampler/clone
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/weightmasksampler/clone.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:26:38.316Z
locale: en-us
---

# Clone()

> Creates a sampler that holds the same weights for the same rig, with its own memory.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

```csharp
public WeightMaskSampler Clone()
```

### Returns

| Type                                                                                       | Description                                                                                           |
| ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| [WeightMaskSampler](/engine/7000.0/script-reference/unity/animations/weightmasksampler.md) | The new sampler. Dispose it when you finish with it. A default sampler if this sampler isn't created. |

### Remarks

The clone copies the weights of this sampler, so it's much faster than creating a sampler from a weight mask. It uses the allocator of this sampler. The clone doesn't share memory with this sampler. Dispose it separately. You can use the clone after you dispose this sampler.
