---
title: Replace
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/rigbuilder/replace
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/replace.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:51:27.095Z
locale: en-us
---

# Replace

> Replaces the skeleton node that has the same identifier as a node.

## 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)

## Replace(SkeletonNode)

Replaces the skeleton node that has the same identifier as a node.

```csharp
public bool Replace(in SkeletonNode node)
```

### Parameters

**** (\[SkeletonNode]\(/engine/7000.0/script-reference/unity/animations/skeletonnode)): The node that replaces the node with the same [SkeletonNode.Id](/engine/7000.0/script-reference/unity/animations/skeletonnode/id.md).

### Returns

| Type                                                          | Description                                                                                           |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a node with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

The method keeps the index of the node, so the [SkeletonNode.ParentIndex](/engine/7000.0/script-reference/unity/animations/skeletonnode/parentindex.md) of the other nodes stays valid. The new node must follow the same rules as in [RigBuilder.Add](/engine/7000.0/script-reference/unity/animations/rigbuilder/add.md): its parent has a lower index, and only the node at index 0 is a root. To only change the default values of a bone, use [RigBuilder.TrySetBoneDefaultTranslation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaulttranslation.md), [RigBuilder.TrySetBoneDefaultRotation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultrotation.md), and [RigBuilder.TrySetBoneDefaultScale](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultscale.md).

## Replace(LocalTranslationChannel)

Replaces the translation channel that has the same identifier as a channel.

```csharp
public bool Replace(in LocalTranslationChannel channel)
```

### Parameters

**** (\[LocalTranslationChannel]\(/engine/7000.0/script-reference/unity/animations/localtranslationchannel)): The channel that replaces the channel with the same identifier.

### Returns

| Type                                                          | Description                                                                                              |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a channel with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

Use this method to change a channel. The method doesn't change the bones. To change the default translation of a bone, use [RigBuilder.TrySetBoneDefaultTranslation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaulttranslation.md).

## Replace(LocalRotationChannel)

Replaces the rotation channel that has the same identifier as a channel.

```csharp
public bool Replace(in LocalRotationChannel channel)
```

### Parameters

**** (\[LocalRotationChannel]\(/engine/7000.0/script-reference/unity/animations/localrotationchannel)): The channel that replaces the channel with the same identifier.

### Returns

| Type                                                          | Description                                                                                              |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a channel with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

Use this method to change a channel. The method doesn't change the bones. To change the default rotation of a bone, use [RigBuilder.TrySetBoneDefaultRotation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultrotation.md).

## Replace(LocalScaleChannel)

Replaces the scale channel that has the same identifier as a channel.

```csharp
public bool Replace(in LocalScaleChannel channel)
```

### Parameters

**** (\[LocalScaleChannel]\(/engine/7000.0/script-reference/unity/animations/localscalechannel)): The channel that replaces the channel with the same identifier.

### Returns

| Type                                                          | Description                                                                                              |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a channel with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

Use this method to change a channel. The method doesn't change the bones. To change the default scale of a bone, use [RigBuilder.TrySetBoneDefaultScale](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultscale.md).

## Replace(FloatChannel)

Replaces the skeleton node that has the same identifier as a node.

```csharp
public bool Replace(in FloatChannel channel)
```

### Parameters

**** (\[FloatChannel]\(/engine/7000.0/script-reference/unity/animations/floatchannel)):&#x20;

### Returns

| Type                                                          | Description                                                                                           |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a node with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

The method keeps the index of the node, so the [SkeletonNode.ParentIndex](/engine/7000.0/script-reference/unity/animations/skeletonnode/parentindex.md) of the other nodes stays valid. The new node must follow the same rules as in [RigBuilder.Add](/engine/7000.0/script-reference/unity/animations/rigbuilder/add.md): its parent has a lower index, and only the node at index 0 is a root. To only change the default values of a bone, use [RigBuilder.TrySetBoneDefaultTranslation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaulttranslation.md), [RigBuilder.TrySetBoneDefaultRotation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultrotation.md), and [RigBuilder.TrySetBoneDefaultScale](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultscale.md).

## Replace(IntChannel)

Replaces the integer channel that has the same identifier as a channel.

```csharp
public bool Replace(in IntChannel channel)
```

### Parameters

**** (\[IntChannel]\(/engine/7000.0/script-reference/unity/animations/intchannel)): The channel that replaces the channel with the same identifier.

### Returns

| Type                                                          | Description                                                                                              |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a channel with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

Use this method to change a channel.

## Replace(EntityIdChannel)

Replaces the entity ID channel that has the same identifier as a channel.

```csharp
public bool Replace(in EntityIdChannel channel)
```

### Parameters

**** (\[EntityIdChannel]\(/engine/7000.0/script-reference/unity/animations/entityidchannel)): The channel that replaces the channel with the same identifier.

### Returns

| Type                                                          | Description                                                                                              |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder had a channel with the identifier. Otherwise, false, and the builder doesn't change. |

### Remarks

Use this method to change a channel.
