OverlayCanvasSettingsAttribute
Attribute that defines the default settings to use in an Editor Window that supports overlays.
Read time 4 minutesLast updated 12 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Overlays
- Assembly: UnityEditor.CoreModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Class)]public sealed class OverlayCanvasSettingsAttribute : Attribute
Remarks
See also ISupportOverlays and OverlayCanvas.
Examples
using UnityEditor;using UnityEditor.Overlays;[OverlayCanvasSettings(defaultColor = new float[] {1, 0, 0, 0.8f}, defaultColorDark = new float[] { 1, 0, 0, 0.8f }, defaultColorLight = new float[] { 0, 0, 1, 0.8f })]public class OverlayCanvasSettingsExample : EditorWindow, ISupportsOverlays{ [MenuItem("Test/Open Canvas Window")] static void OpenWindow() { GetWindow<OverlayCanvasSettingsExample>(); }}
Constructors
Constructor | Description |
|---|---|
| OverlayCanvasSettingsAttribute() | The attribute that defines the default settings for an Editor Window that supports overlays. |
Properties
Property | Description |
|---|---|
| allowDynamicPanelBehaviorChanges | Defines if the Displace Window behavior of dynamic panels can be modified for that window type. |
| defaultColor | Defines the default background color of the Overlay for this window. |
| defaultColorDark | Defines the default background color of the Overlay for this window when the editor uses the dark theme. |
| defaultColorLight | Defines the default background color of the Overlay for this window when the editor uses the Dark theme. |
| dynamicPanelBehavior | Defines the default DynamicPanelBehavior of the OverlayCanvas. |