Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

[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

allowDynamicPanelBehaviorChangesDefines if the Displace Window behavior of dynamic panels can be modified for that window type.
defaultColorDefines the default background color of the Overlay for this window.
defaultColorDarkDefines the default background color of the Overlay for this window when the editor uses the dark theme.
defaultColorLightDefines the default background color of the Overlay for this window when the editor uses the Dark theme.
dynamicPanelBehaviorDefines the default DynamicPanelBehavior of the OverlayCanvas.

Inheritance

Inherited Members