# OverlayAttribute

> Attribute used to register a class as an overlay.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Overlays](/engine/6000.7/script-reference/unityeditor/overlays.md)
* **Assembly:** UnityEditor.CoreModule
* **Inherits from:** [Attribute](https://learn.microsoft.com/dotnet/api/system.attribute)

```csharp
[AttributeUsage(AttributeTargets.Class)]
public sealed class OverlayAttribute : Attribute
```

## Remarks

Overlay must derive from the Overlay class.

## Constructors

| Constructor                                                                                                                                                                                                                | Description                                                                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [OverlayAttribute()](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/ctor.md#overlayattribute\(\))                                                                                                   | Attribute used to register a class as an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md). |
| [OverlayAttribute(System.Type,System.String,System.Boolean)](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/ctor.md#overlayattribute\(type-string-bool\))                                           | Attribute used to register a class as an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md). |
| [OverlayAttribute(System.Type,System.String,System.String,System.Boolean)](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/ctor.md#overlayattribute\(type-string-string-bool\))                      | Attribute used to register a class as an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md). |
| [OverlayAttribute(System.Type,System.String,System.String,System.String,System.Boolean)](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/ctor.md#overlayattribute\(type-string-string-string-bool\)) | Attribute used to register a class as an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md). |

## Properties

| Property                                                                                                            | Description                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [defaultDisplay](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultdisplay.md)           | Whether the target [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md) is shown when a new instance of the [EditorWindow](/engine/6000.7/script-reference/unityeditor/editorwindow.md) type is instantiated. |
| [defaultDockIndex](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultdockindex.md)       | Sets the defaultDockIndex to define where in a [DockZone](/engine/6000.7/script-reference/unityeditor/overlays/dockzone.md) an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md) is placed.                |
| [defaultDockPosition](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultdockposition.md) | Sets the default alignment for a new [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md) instance.                                                                                                           |
| [defaultDockZone](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultdockzone.md)         | Sets the default location of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md) in an [EditorWindow](/engine/6000.7/script-reference/unityeditor/editorwindow.md).                                       |
| [defaultHeight](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultheight.md)             | Sets the default height of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md).                                                                                                                           |
| [defaultLayout](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultlayout.md)             | Sets the default [Layout](/engine/6000.7/script-reference/unityeditor/overlays/layout.md) for an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md) when it is created for the first time.                  |
| [defaultWidth](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/defaultwidth.md)               | Sets the default width of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md).                                                                                                                            |
| [displayName](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/displayname.md)                 | Defines the display name of the overlay.                                                                                                                                                                                            |
| [editorWindowType](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/editorwindowtype.md)       | Defines which [EditorWindow](/engine/6000.7/script-reference/unityeditor/editorwindow.md) type the overlay is used in.                                                                                                              |
| [group](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/group.md)                             | The name of the group this overlay menu belongs to.                                                                                                                                                                                 |
| [id](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/id.md)                                   | Defines the unique identifier used to identify the overlay.                                                                                                                                                                         |
| [maxHeight](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/maxheight.md)                     | Sets the maximum height of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md).                                                                                                                           |
| [maxWidth](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/maxwidth.md)                       | Sets the maximum width of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md).                                                                                                                            |
| [minHeight](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/minheight.md)                     | Sets the minimum height of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md).                                                                                                                           |
| [minWidth](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/minwidth.md)                       | Sets the minimum width of an [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md).                                                                                                                            |
| [priority](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/priority.md)                       | Sets the order that overlays are displayed in the overlay menu. The default value is 100. Lower values are displayed before higher values.                                                                                          |
| [ussName](/engine/6000.7/script-reference/unityeditor/overlays/overlayattribute/ussname.md)                         | Name of the overlay's root visual element.                                                                                                                                                                                          |

## Inheritance

**Inherited Members:**

* [Attribute.GetCustomAttributes(MemberInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-memberinfo-system-type\))
* [Attribute.GetCustomAttributes(MemberInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-memberinfo-system-type-system-boolean\))
* [Attribute.GetCustomAttributes(MemberInfo)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-memberinfo\))
* [Attribute.GetCustomAttributes(MemberInfo, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-memberinfo-system-boolean\))
* [Attribute.IsDefined(MemberInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-memberinfo-system-type\))
* [Attribute.IsDefined(MemberInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-memberinfo-system-type-system-boolean\))
* [Attribute.GetCustomAttribute(MemberInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-memberinfo-system-type\))
* [Attribute.GetCustomAttribute(MemberInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-memberinfo-system-type-system-boolean\))
* [Attribute.GetCustomAttributes(ParameterInfo)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-parameterinfo\))
* [Attribute.GetCustomAttributes(ParameterInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-parameterinfo-system-type\))
* [Attribute.GetCustomAttributes(ParameterInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-parameterinfo-system-type-system-boolean\))
* [Attribute.GetCustomAttributes(ParameterInfo, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-parameterinfo-system-boolean\))
* [Attribute.IsDefined(ParameterInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-parameterinfo-system-type\))
* [Attribute.IsDefined(ParameterInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-parameterinfo-system-type-system-boolean\))
* [Attribute.GetCustomAttribute(ParameterInfo, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-parameterinfo-system-type\))
* [Attribute.GetCustomAttribute(ParameterInfo, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-parameterinfo-system-type-system-boolean\))
* [Attribute.GetCustomAttributes(Module, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-module-system-type\))
* [Attribute.GetCustomAttributes(Module)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-module\))
* [Attribute.GetCustomAttributes(Module, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-module-system-boolean\))
* [Attribute.GetCustomAttributes(Module, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-module-system-type-system-boolean\))
* [Attribute.IsDefined(Module, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-module-system-type\))
* [Attribute.IsDefined(Module, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-module-system-type-system-boolean\))
* [Attribute.GetCustomAttribute(Module, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-module-system-type\))
* [Attribute.GetCustomAttribute(Module, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-module-system-type-system-boolean\))
* [Attribute.GetCustomAttributes(Assembly, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-assembly-system-type\))
* [Attribute.GetCustomAttributes(Assembly, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-assembly-system-type-system-boolean\))
* [Attribute.GetCustomAttributes(Assembly)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-assembly\))
* [Attribute.GetCustomAttributes(Assembly, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattributes#system-attribute-getcustomattributes\(system-reflection-assembly-system-boolean\))
* [Attribute.IsDefined(Assembly, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-assembly-system-type\))
* [Attribute.IsDefined(Assembly, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.isdefined#system-attribute-isdefined\(system-reflection-assembly-system-type-system-boolean\))
* [Attribute.GetCustomAttribute(Assembly, Type)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-assembly-system-type\))
* [Attribute.GetCustomAttribute(Assembly, Type, bool)](https://learn.microsoft.com/dotnet/api/system.attribute.getcustomattribute#system-attribute-getcustomattribute\(system-reflection-assembly-system-type-system-boolean\))
* [Attribute.Equals(Object)](https://learn.microsoft.com/dotnet/api/system.attribute.equals)
* [Attribute.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.attribute.gethashcode)
* [Attribute.Match(Object)](https://learn.microsoft.com/dotnet/api/system.attribute.match)
* [Attribute.IsDefaultAttribute()](https://learn.microsoft.com/dotnet/api/system.attribute.isdefaultattribute)
* [Attribute.TypeId()](https://learn.microsoft.com/dotnet/api/system.attribute.typeid)
