# RemoveNode(AccessibilityNode, bool)

> Removes the node from the accessibility hierarchy and removes or re-parents its descendants.

## Definition

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

```csharp
public void RemoveNode(AccessibilityNode node, bool removeChildren = true)
```

### Parameters

**** (\[AccessibilityNode]\(/engine/6000.7/script-reference/unityengine/accessibility/accessibilitynode)): The node to remove.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): `true` if the node's descendants should also be removed, or `false` if they should be moved under the node's parent. Defaults to `true`.

### 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**: Removing a node has a high cost that scales with the size of the affected subtree. Avoid calling this method frequently in performance-sensitive code.

* **macOS**: Removing a node has a moderate cost that scales with the size of the affected subtree. Calling this method frequently can affect performance.

Removing a node from an inactive hierarchy has no native cost.
