Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

DockZone

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

DockZone describes the area of the screen that an Overlay is displayed in.

Use DockZone in an OverlayAttribute to set the default location for an Overlay.

using UnityEditor;
using UnityEditor.Overlays;
using UnityEngine;
using UnityEngine.UIElements;

// Use OverlayAttribute to specify that in new Scene Views, when this Overlay is first opened it will be in the // top toolbar, aligned to the left side. [Overlay(typeof(SceneView), "Docked Top Toolbar, Left Aligned", defaultDockZone = DockZone.TopToolbar, defaultDockPosition = DockPosition.Top)] class MyOverlay : Overlay { public override VisualElement CreatePanelContent() => new Label("Overlay Contents"); }

Properties

LeftToolbarOverlays are displayed in the left toolbar.
RightToolbarOverlays are displayed in the right toolbar.
TopToolbarOverlays are displayed in the top toolbar.
BottomToolbarOverlays are displayed in the bottom toolbar.
LeftColumnOverlays are displayed in the left column.
RightColumnOverlays are displayed in the right column.
FloatingOverlays are not bound to a toolbar or column.