# DockPosition

> DockPosition describes the alignment of an Overlay within a DockZone.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEditor.Overlays](/engine/6000.7/script-reference/unityeditor/overlays.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public enum DockPosition
```

## Remarks

Use [DockPosition](/engine/6000.7/script-reference/unityeditor/overlays/dockposition.md) in an [OverlayAttribute](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute.md) to set the default location for an Overlay.

## Examples

```csharp
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                                                                                                                             |
| ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| [Bottom](/engine/6000.7/script-reference/unityeditor/overlays/dockposition/bottom.md) | The Overlay will be aligned to the bottom or right of the [DockZone](/engine/6000.7/script-reference/unityeditor/overlays/dockzone.md). |
| [Top](/engine/6000.7/script-reference/unityeditor/overlays/dockposition/top.md)       | The Overlay will be aligned to the top or left of the [DockZone](/engine/6000.7/script-reference/unityeditor/overlays/dockzone.md).     |
