# MoveNode(AccessibilityNode, AccessibilityNode, int)

> Moves the node elsewhere in the accessibility hierarchy. For example, under a different parent or at a different position in the parent's child list.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Accessibility](/engine/6000.7/script-reference/unityengine/accessibility.md)
* **Assembly:** UnityEngine.AccessibilityModule

```csharp
public bool MoveNode(AccessibilityNode node, AccessibilityNode newParent, int newChildIndex = -1)
```

### Parameters

**** (\[AccessibilityNode]\(/engine/6000.7/script-reference/unityengine/accessibility/accessibilitynode)): The node to move.**** (\[AccessibilityNode]\(/engine/6000.7/script-reference/unityengine/accessibility/accessibilitynode)): The new parent of the node, or `null` if the node should be placed at the root level.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An optional zero-based index which provides the position of the moved node in the new parent's child list or in the list of root nodes if the node should be a root. If the index is not provided or is invalid, then the node is moved at the end of the new parent's child list.

### Returns

| Type                                                          | Description                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the node was successfully moved and `false` otherwise. |

### Remarks

**Warning**: When this hierarchy is the [\_activeHierarchy](/engine/6000.7/script-reference/unityengine/accessibility/assistivesupport/activehierarchy.md), this method has a non-trivial cost on the following platforms:

* **iOS**: Moving a node has a high cost that scales with the size of the subtree being moved. Avoid calling this method frequently in performance-sensitive code.

* **macOS**: Moving a node has a moderate cost. Calling this method frequently can affect performance.

Moving a node in an inactive hierarchy has no native cost.
