# CreateBlendTreeChild

> Utility function to add a child blend tree to a blend tree.

## Definition

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

## CreateBlendTreeChild(float)

Utility function to add a child blend tree to a blend tree.

```csharp
public BlendTree CreateBlendTreeChild(float threshold)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The threshold of the child. When using 1D blend trees.

### Returns

| Type                                                                             | Description |
| -------------------------------------------------------------------------------- | ----------- |
| [BlendTree](/engine/6000.6/script-reference/unityeditor/animations/blendtree.md) |             |

### Remarks

The blend tree asset that is created is added as a sub asset of the blend tree. This function pushes an Undo operation.

## CreateBlendTreeChild(Vector2)

Utility function to add a child blend tree to a blend tree.

```csharp
public BlendTree CreateBlendTreeChild(Vector2 position)
```

### Parameters

**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): The position of the child. When using 2D blend trees.

### Returns

| Type                                                                             | Description |
| -------------------------------------------------------------------------------- | ----------- |
| [BlendTree](/engine/6000.6/script-reference/unityeditor/animations/blendtree.md) |             |

### Remarks

The blend tree asset that is created is added as a sub asset of the blend tree. This function pushes an Undo operation.
