Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HierarchyViewModel

A hierarchy view model is a read-only filtering view of a HierarchyFlattened.
Read time 4 minutesLast updated 12 days ago

Definition

public sealed class HierarchyViewModel : IDisposable

Remarks

Additional Resources: Hierarchy, HierarchyNode

Constructors

Properties

Property

Description

CountThe total number of hierarchy nodes in the hierarchy view model.
FilteringWhether the hierarchy view model is currently filtering nodes.
IsCreatedWhether this object is valid and uses memory.
this[]Gets the HierarchyNode at a specified index.
UpdateNeededWhether the hierarchy view model requires an update.
UpdatingWhether the hierarchy view model is currently updating.

Methods

Method

Description

AsReadOnlySpanReturns a read-only span of all hierarchy nodes in the view model.
BeginFlagsChangeBegins a batch of flags changes.
ClearFlagsClears the specified flags on the hierarchy node indices.
ClearFlagsRecursiveClears the specified flags recursively on the hierarchy nodes.
ContainsDetermines if a specified node is in the hierarchy view model.
DestroyHandlerStateDisposes and forgets the state a node type handler keeps for this view model.
DisposeDisposes this object and releases its memory.
DoesNotHaveFlagsGets whether or not all of the specified flags are not set on the hierarchy node.
DoesNotHaveFlagsCountGets the number of nodes that do not have all of the specified flags set.
EndFlagsChangeEnds a batch of flags changes.
EndFlagsChangeWithoutNotifyEnds a batch of flags changes without notifying listeners.
EnumerateNodesWithFlagsGets an enumerable of all hierarchy nodes that have all of the specified flags set.
EnumerateNodesWithoutFlagsGets an enumerable of all hierarchy nodes that do not have all of the specified flags set.
GetChildGets the child node at the specified index of a hierarchy node.
GetChildIndexGets the index of a hierarchy node in its parent's children list.
GetChildrenCountGets the number of child nodes that a hierarchy node has.
GetChildrenCountRecursiveGets the number of child nodes that a hierarchy node has, including children of children.
GetDepthDetermines the depth level of a hierarchy node within the view model.
GetEnumeratorGets the HierarchyNode enumerator.
GetFlagsGets all the flags set on a given hierarchy node.
GetIndicesWithFlagsGets the indices for all hierarchy nodes that have all of the specified flags set.
GetIndicesWithoutFlagsGets the indices of all hierarchy nodes that do not have all of the specified flags set.
GetNextSiblingGets the next sibling of a hierarchy node in the view model.
GetNodesWithFlagsGets all hierarchy nodes that have all of the specified flags set.
GetNodesWithoutFlagsGets all hierarchy nodes that do not have all of the specified flags set.
GetNodeTypeGets the hierarchy node type for the specified node.
GetNodeTypeHandlerBaseGets the node type handler instance for the specified node from this hierarchy view model.
GetOrCreateHandlerStateGets the state a node type handler keeps for this view model, creating it when there is none.
GetParentGets the parent of a hierarchy node.
GetRootGets the root node of the hierarchy view model.
HasFlagsGets whether or not all of the specified flags are set on the hierarchy node.
HasFlagsCountGets the number of nodes that have all of the specified flags set.
HasVisibleChildrenDetermines whether a hierarchy node has any visible direct children (children without the Hidden flag).
IndexOfGets the index of a specified node.
SetFlagsSets the specified flags on the hierarchy node indices.
SetFlagsRecursiveSets the specified flags recursively on the hierarchy nodes.
SetQuerySets the search query to filter the hierarchy nodes displayed in the view model.
SetRootSets the root of the hierarchy view model.
ToggleFlagsToggles the specified flags on the hierarchy node indices.
ToggleFlagsRecursiveToggles the specified flags recursively on the hierarchy nodes.
TryGetHandlerStateGets the state a node type handler keeps for this view model.
UpdateUpdates the hierarchy view model and requests a rebuild of the list of HierarchyNode that filters the HierarchyFlattened.
UpdateIncrementalUpdates the hierarchy view model incrementally.
UpdateIncrementalTimedUpdates the hierarchy view model incrementally until a time limit is reached.

Events

Member

Description

FlagsChangedEvent that is invoked when flags on hierarchy nodes are changed.

Structs

Struct

Description

HierarchyViewModel.EnumeratorAn enumerator of HierarchyNode. Enumerates and filters items at the same time.

Delegates

Delegate

Description

HierarchyViewModel.FlagsChangedEventHandlerDelegate that is invoked when flags on hierarchy nodes are changed.