Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DockPosition

DockPosition describes the alignment of an Overlay within a DockZone.
Read time 1 minuteLast updated 11 days ago

Definition

public enum DockPosition

Remarks

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

Examples

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");}

Fields

Value

Description

BottomThe Overlay will be aligned to the bottom or right of the DockZone.
TopThe Overlay will be aligned to the top or left of the DockZone.