Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

AccessibilityHierarchy.RemoveNode

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void RemoveNode(AccessibilityNode node, bool removeChildren);

Parameters

Parameter Description
node The node to remove.
removeChildren 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.

Description

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

Warning: When this hierarchy is the AssistiveSupport.activeHierarchy, 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.