Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HierarchyFlattened

Represents a read-only array of HierarchyFlattenedNode over a HierarchyFlattened.Hierarchy. Used as an acceleration structure for query purposes.
Read time 2 minutesLast updated 11 days ago

Definition

public sealed class HierarchyFlattened : IDisposable

Remarks

Querying information about nodes completes much faster than the same methods on HierarchyFlattened.Hierarchy because they are stored during the updates.

Constructors

Constructor

Description

HierarchyFlattened(Unity.Hierarchy.Hierarchy)Constructs a new HierarchyFlattened from a hierarchy.

Properties

Property

Description

CountThe total number of flattened nodes.
IsCreatedWhether this object is valid and uses memory or not.
this[]Gets the HierarchyFlattenedNode at a specified index.
UpdateNeededDetermines if the flattened hierarchy needs an update.
UpdatingWhether the flattened hierarchy is currently updating.

Methods

Method

Description

AsReadOnlySpanReturns a read-only span of all hierarchy flattened nodes in the hierarchy flattened.
ContainsDetermines if a specified node is in the hierarchy flattened.
DisposeDisposes this object to release its memory.
EnumerateChildrenGets an enumerable of children HierarchyFlattenedNode for the specified node.
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 of a node.
GetEnumeratorGets the HierarchyFlattenedNode enumerator.
GetNextSiblingGets the next sibling of a node.
GetParentGets the parent of a hierarchy node.
IndexOfGets the zero-based index of a specified node.
UpdateUpdates the flattened hierarchy and requests a rebuild of the list of HierarchyFlattenedNode from the HierarchyFlattened.Hierarchy topology.
UpdateIncrementalUpdates the flattened hierarchy incrementally.
UpdateIncrementalTimedIncrementally updates the flattened hierarchy until a time limit is reached.

Structs

Struct

Description

HierarchyFlattened.EnumeratorAn enumerator of HierarchyFlattenedNode.