Version: 2022.3
LanguageEnglish
  • C#

OverlayCanvas.Remove

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

Declaration

public bool Remove(Overlays.Overlay overlay);

Parameters

overlay The Overlay to remove.

Returns

bool Returns true if Overlay was found and removed, false if Overlay was not present in OverlayCanvas.

Description

Remove 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.

An Overlay may only belong to a single OverlayCanvas. To display an Overlay in multiple windows, you must instantiate an Overlay for each window.