Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HierarchyCommandList

Represents a list of commands that modify a hierarchy.
Read time 2 minutesLast updated 8 days ago

Definition

public sealed class HierarchyCommandList : IDisposable

Constructors

Properties

Property

Description

CapacityThe capacity in bytes for storing commands in the command list.
IsCreatedDetermines if this object is valid and uses memory.
IsEmptyDetermines if the command list is empty.
IsExecutingDetermines if the command list is currently executing.
SizeThe current size in bytes used by commands in the command list.

Methods

Method

Description

AddAdds multiple new nodes that have a specified parent node to the hierarchy.
ClearClears all commands from the command list.
ClearPropertyClears a property value for the specified hierarchy node.
DetachSevers a hierarchy node from its parent, without removing it from the hierarchy.
DetachChildrenSevers every child of a hierarchy node from it, without removing them from the hierarchy.
DisposeDisposes the command list and releases its memory.
ExecuteExecutes all the commands in the hierarchy command list.
ExecuteIncrementalExecutes one command from the hierarchy command list.
ExecuteIncrementalTimedExecutes commands from the hierarchy command list until a time limit is reached.
RemoveRemoves a node from the hierarchy.
RemoveChildrenRecursively removes all children of a node.
ReserveReserves memory for nodes to use. Use this to avoid memory allocation hits when you add batches of nodes.
SetChildrenNeedsSortingMarks a hierarchy node as requiring sorting of its children in the next sorting operation.
SetDirtyForce an update of the hierarchy, even if no changes are pending.
SetNameSets a name for a hierarchy node.
SetParentSets the parent node of a hierarchy node.
SetPropertySets a value for a property of a hierarchy node
SetSortIndexSets the sorting index for a hierarchy node.
SortChildrenSorts the child nodes of a hierarchy node by their sort index.
SortChildrenRecursiveRecursively sorts the child nodes of a hierarchy node by their sort index.