---
title: Create(AvatarMask, Allocator)
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/weightmaskbuilder/create
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/weightmaskbuilder/create.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:01:18.156Z
locale: en-us
---

# Create(AvatarMask, Allocator)

> Create WeightMaskBuilder from an AvatarMask asset.

## 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
[ExcludeFromBurstCompatTesting("Takes managed AvatarMask")]
public static WeightMaskBuilder Create(AvatarMask avatarMask, Allocator allocator)
```

### Parameters

**** (\[AvatarMask]\(/engine/7000.0/script-reference/unityengine/avatarmask)): AvatarMask asset.**** (\[Allocator]\(/engine/7000.0/script-reference/unity/collections/allocator)): Allocator used for WeightMaskBuilder. Allocator is a member of the \<a href="[https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html"\&gt;Unity.Collections.Allocator\&lt;/a](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html"\&gt;Unity.Collections.Allocator\&lt;/a)> enumeration.

### Returns

| Type                                                                                       | Description                                                               |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| [WeightMaskBuilder](/engine/7000.0/script-reference/unity/animations/weightmaskbuilder.md) | Returns a WeightMaskBuilder with the transform weights of the AvatarMask. |

### Remarks

Use this method to change the weight mask of an AvatarMask, for example to propagate the weight of a transform to its children or to mask generic channels. To use the weight mask of an AvatarMask as it is, read the weight mask that the AvatarMask stores with [AvatarMaskExtensions.ToWeightMaskReference](/engine/7000.0/script-reference/unity/animations/avatarmaskextensions/toweightmaskreference.md) instead of building a new one.

The builder has the same transform masking as an AvatarMask in an Animator layer. If the AvatarMask has no transforms, [WeightMaskBuilder.DefaultTransformWeight](/engine/7000.0/script-reference/unity/animations/weightmaskbuilder/defaulttransformweight.md) is 1 and every transform is included. Otherwise, [WeightMaskBuilder.DefaultTransformWeight](/engine/7000.0/script-reference/unity/animations/weightmaskbuilder/defaulttransformweight.md) is 0 and each transform of the AvatarMask has its weight, without propagating it to its children. [WeightMaskBuilder.DefaultGenericWeight](/engine/7000.0/script-reference/unity/animations/weightmaskbuilder/defaultgenericweight.md) is 1. Humanoid body parts aren't part of the weight mask.
