OverlayAttribute
Attribute used to register a class as an Overlay.
Read time 2 minutesLast updated 12 days ago
Definition
- Type: Constructor
- Namespace: UnityEditor.Overlays
- Assembly: UnityEditor.CoreModule
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
Defines which EditorWindow type the overlay will be used in.
Defines the unique identifier used to identify the overlay.
Defines what the display name of the overlay will be.
Name of the overlay's root visual element.
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
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
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.