Version: 2023.2
LanguageEnglish
  • C#

HierarchyViewModel

class in Unity.Hierarchy

/

Implemented in:UnityEngine.HierarchyCoreModule

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

Description

A hierarchy view model is a read-only filtering view of a HierarchyFlattened.

Properties

Count The total number of nodes.
Hierarchy Accesses the Hierarchy.
HierarchyFlattened Accesses the HierarchyFlattened.
IsCreated Whether this object is valid and uses memory.
this[int] Gets the HierarchyNode at a specified index.
UpdateNeeded Whether the hierarchy view model requires an update.
Updating Whether the hierarchy view model is currently updating.

Constructors

HierarchyViewModel Creates a new HierarchyViewModel from a HierarchyFlattened.

Public Methods

ClearFlags Clears the specified flags on all hierarchy nodes.
Contains Determines if a specified node is in the hierarchy view model.
Dispose Disposes this object and releases its memory.
DoesNotHaveFlags Gets whether or not the specified flags is not set on any hierarchy node.
DoesNotHaveFlagsCount Gets the number of nodes that does not have the specified flags set.
EnumerateNodesWithFlags Gets an enumerable of all hierarchy nodes that have the specified flags set.
EnumerateNodesWithoutFlags Gets an enumerable of all hierarchy nodes that does not have the specified flags set.
GetChildrenCount Gets the number of child nodes that a hierarchy node has.
GetChildrenCountRecursive Gets the number of child nodes that a hierarchy node has, including children of children.
GetDepth Determines the depth of a node.
GetEnumerator Gets the HierarchyNode enumerator.
GetIndicesWithFlags Gets all hierarchy node indices that have the specified flags set.
GetIndicesWithoutFlags Gets all hierarchy node indices that does not have the specified flags set.
GetNextSibling Gets the next sibling of a node.
GetNodesWithFlags Gets all hierarchy nodes that have the specified flags set.
GetNodesWithoutFlags Gets all hierarchy nodes that does not have the specified flags set.
GetParent Gets the parent of a hierarchy node.
HasFlags Gets whether or not the specified flags is set on any hierarchy node.
HasFlagsCount Gets the number of nodes that have the specified flags set.
IndexOf Gets the zero-based index of a specified node.
SetFlags Sets the specified flags on all hierarchy nodes.
SetQuery Sets the search query.
ToggleFlags Toggles the specified flags on all hierarchy nodes.
Update Updates the hierarchy view model and requests a rebuild of the list of HierarchyNode that filters the HierarchyFlattened.
UpdateIncremental Updates the hierarchy view model incrementally.
UpdateIncrementalTimed Updates the hierarchy view model incrementally until a time limit is reached.