Version: Unity 6.1 Alpha (6000.1)
LanguageEnglish
  • C#

OverlayCanvas

class in UnityEditor.Overlays


Implements interfaces:ISerializationCallbackReceiver

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

OverlayCanvas is a container for collections of Overlays.

Every EditorWindow has an OverlayCanvas, but only windows that opt-in to Overlay support will display Overlays. See ISupportsOverlays for more information.

Properties

overlaysThe Overlays in this canvas.
overlaysEnabledReturns true if overlays display in the window, or false if overlays are hidden.

Public Methods

AddAdd an Overlay to this canvas. Added Overlays will be displayed in the associated EditorWindow until they are removed.
OnAfterDeserializeInvoked after OverlayCanvas is deserialized.
OnBeforeSerializeInvoked before OverlayCanvas will be serialized. This is used to store Overlay layout data.
RemoveRemove an Overlay from this canvas. Removed Overlays are disassociated from OverlayCanvas and the related EditorWindow, but not destroyed. This means you are able to move a single Overlay between multiple windows.
ResetOverlayResets the overlay to its default state.
RestoreOverlayRestores Overlay state according to the data parameter.
ShowPopupDisplays an overlay as a pop-up in a EditorWindow.
ShowPopupAtMouseDisplays an overlay as a pop-up in a EditorWindow at the mouse position.