Attribute that defines the default settings to use in an Editor Window that supports overlays.
See also ISupportOverlays and OverlayCanvas.
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>(); } }
| 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. |
| Constructor | Description |
|---|---|
| OverlayCanvasSettingsAttribute | The attribute that defines the default settings for an Editor Window that supports overlays. |