# Create

> Creates an AnimationLayerMixerPlayable in the PlayableGraph.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Animations](/engine/6000.5/script-reference/unityengine/animations.md)
* **Assembly:** UnityEngine.AnimationModule

## Create(PlayableGraph, int)

Creates an [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md) in the [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md).

```csharp
public static AnimationLayerMixerPlayable Create(PlayableGraph graph, int inputCount = 0)
```

### Parameters

**** (\[PlayableGraph]\(/engine/6000.5/script-reference/unityengine/playables/playablegraph)): The [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md) that will contain the new [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of layers.

### Returns

| Type                                                                                                                 | Description                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md) | A new [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md) linked to the [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md). |

## Create(PlayableGraph, int, bool)

Creates an [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md) in the [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md).

```csharp
public static AnimationLayerMixerPlayable Create(PlayableGraph graph, int inputCount, bool singleLayerOptimization)
```

### Parameters

**** (\[PlayableGraph]\(/engine/6000.5/script-reference/unityengine/playables/playablegraph)): The [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md) that will contain the new [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of layers.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): This optimization automatically sets the weight of the first animation layer to 1. Set to true If your layer mixer has a single animation layer and you want to bypass unnecessary weight calculations. This optimization is automatically set to false if your layer mixer has multiple animation layers.

### Returns

| Type                                                                                                                 | Description                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md) | A new [AnimationLayerMixerPlayable](/engine/6000.5/script-reference/unityengine/animations/animationlayermixerplayable.md) linked to the [PlayableGraph](/engine/6000.5/script-reference/unityengine/playables/playablegraph.md). |
