Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HierarchyWindow

Represents the Hierarchy Window in the Unity Editor. Use this class to customize the Hierarchy window, register node type handlers, and handle view events.
Read time 8 minutesLast updated 12 days ago

Definition

[EditorWindowTitle(title = "Hierarchy")]public sealed class HierarchyWindow : EditorWindow, IHasCustomMenu, ISerializationCallbackReceiver

Constructors

Constructor

Description

HierarchyWindow()Creates a new HierarchyWindow.

Properties

Property

Description

ViewGets the HierarchyView currently being displayed in this HierarchyWindow.

Methods

Method

Description

SetSearchTextSets the search filter text in the HierarchyWindow.
UpdateEditorSelectionUpdates the Editor Selection to match the EntityId of the nodes that are flagged as selected in the Hierarchy.

Static Events

Member

Description

BindViewRaised when a HierarchyView is bound to the Hierarchy window. Typically used to load additional stylesheets and add styles to HierarchyView.StyleContainer.
BindViewItemRaised when a HierarchyViewItem is bound to a HierarchyView. Use this event to customize the view item.
GetTooltipCustomize the tooltip that displays when the mouse hovers the node name label.
PopulateContextMenuRaised when a right click is handled on a node or on the background of the HierarchyView.
UnbindViewRaised when a HierarchyView is about to be unbound from the HierarchyWindow. Typically used to cleanup resources associated with the view.
UnbindViewItemRaised when a HierarchyViewItem is unbound from a HierarchyView. Use this event to cleanup the view item. Note that hierarchy view item are recycled by handler, so unbinding doesn't mean destruction. For performance reasons, the recommended best practice is to not undo styles or modifications done during binding in this unbind event.

Delegates

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.