Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HierarchyNodeTypeHandlerBase

Provides a base class for hierarchy node type handlers.
Read time 2 minutesLast updated 10 days ago

Definition

  • Type: Class
  • Namespace: Unity.Hierarchy
  • Assembly: UnityEngine.HierarchyCoreModule
public abstract class HierarchyNodeTypeHandlerBase

Constructors

Constructor

Description

HierarchyNodeTypeHandlerBase()Constructs a new HierarchyNodeTypeHandlerBase.

Properties

Property

Description

CommandListGet the HierarchyCommandList associated with this handler.
HierarchyGet the Hierarchy owning this handler.

Methods

Method

Description

DisposeDisposes this hierarchy node type handler to free up resources in the derived class.
GetEntityIdsFromNodesGets the EntityId corresponding to each HierarchyNode in
nodes
. Slots already set to a non-EntityId.None value must be skipped.
GetNodeFromEntityIdGets the HierarchyNode corresponding to the given EntityId.
GetNodesFromEntityIdsGets the HierarchyNode corresponding to each EntityId in
entityIds
. Slots already set to a non-null value must be skipped.
GetNodeTypeRetrieves the hierarchy node type for this hierarchy node type handler.
GetNodeTypeNameGet the type name of this hierarchy node type handler.
GetUIDInfoReturns the UID serialization info for this handler. A HierarchyUIDInfo.Size of 0 means this handler does not support UID serialization and its nodes will be skipped. UID serialization is used in Hierarchy view state serialization and Undo/Redo operations.
InitializeInitializes this hierarchy node type handler.
SearchBeginCalled when a new search query begins, for the view model running the search.
SearchEndCalled when a search query ends, for the view model that was running the search.
SetSearchAlwaysVisibleSets whether nodes of this type should always be visible during search when descendants match.
UndoRedoSupportedDetermines whether this hierarchy node type handler supports undo/redo operations. When doing certain operations that modify the hierarchy, for example reordering nodes with mixed-types, the hierarchy needs to know if the involved node type handlers support undo/redo in order to determine whether to create an undo operation for the changes specific to the hierarchy. Return
true
if this node type handler has underlying data that supports undo/redo. Return
false
if this node type handler has underlying data that does not support undo/redo.
UpdateBeginCalled when the hierarchy update begins.
UpdateEndCalled when the hierarchy update ends.
ViewModelPostSetStateCalled after the HierarchyViewModel finishes setting its state.
ViewModelPostUpdateCalled after the HierarchyViewModel finishes being updated.
WriteUIDsSerializes stable identifiers for the given nodes into
outUIDs
. The buffer is pre-zeroed; write only slots that have a valid identity. Unwritten slots are treated as unresolvable during restore.