Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


OverlayAttribute

Attribute used to register a class as an Overlay.
Read time 2 minutesLast updated 12 days ago

Definition

OverlayAttribute()

Attribute used to register a class as an Overlay.
public OverlayAttribute()

Remarks

Overlays are not directly instantiated in code. The Editor will use reflection on startup to identify Overlay classes with an OverlayAttribute to populate the available Overlays in an Editor Window.

OverlayAttribute(Type, string, string, string, bool)

Attribute used to register a class as an Overlay.
public OverlayAttribute(Type editorWindowType, string id, string displayName, string ussName, bool defaultDisplay = false)

Parameters

editorWindowType

Defines which EditorWindow type the overlay will be used in.

Defines the unique identifier used to identify the overlay.

displayName

Defines what the display name of the overlay will be.

ussName

Name of the overlay's root visual element.

defaultDisplay

True if this Overlay is enabled by default in new windows.

Remarks

Overlays are not directly instantiated in code. The Editor will use reflection on startup to identify Overlay classes with an OverlayAttribute to populate the available Overlays in an Editor Window.

OverlayAttribute(Type, string, string, bool)

Attribute used to register a class as an Overlay.
public OverlayAttribute(Type editorWindowType, string id, string displayName, bool defaultDisplay = false)

Parameters

editorWindowType

Defines which EditorWindow type the overlay will be used in.

Defines the unique identifier used to identify the overlay.

displayName

Defines what the display name of the overlay will be.

defaultDisplay

True if this Overlay is enabled by default in new windows.

Remarks

Overlays are not directly instantiated in code. The Editor will use reflection on startup to identify Overlay classes with an OverlayAttribute to populate the available Overlays in an Editor Window.

OverlayAttribute(Type, string, bool)

Attribute used to register a class as an Overlay.
public OverlayAttribute(Type editorWindowType, string displayName, bool defaultDisplay = false)

Parameters

editorWindowType

Defines which EditorWindow type the overlay will be used in.

displayName

Defines what the display name of the overlay will be.

defaultDisplay

True if this Overlay is enabled by default in new windows.

Remarks

Overlays are not directly instantiated in code. The Editor will use reflection on startup to identify Overlay classes with an OverlayAttribute to populate the available Overlays in an Editor Window.