Version: 2023.2

IMGUIOverlay

class in UnityEditor.Overlays

/

继承自:Overlays.Overlay

切换到手册

描述

IMGUIOverlay is an implementation of Overlay that provides a IMGUIContainer.

Inherit IMGUIOverlay to author Overlay elements implemented using the legacy IMGUI controls.

公共函数

CreatePanelContentCreatePanelContent is invoked by the OverlayCanvas when this Overlay is shown.
OnGUIImplement IMGUI controls and logic in this method.

继承的成员

静态变量

ussClassName此类型元素的 USS 类名称。

变量

collapsedDefines whether the overlay is in collapsed form.
collapsedIconDefines a custom icon to use when that overlay is in collapsed form.
containerWindowEditorWindow the overlay is contained within.
defaultSizeSet defaultSize to define the size of an Overlay when it hasn't been resized by the user.
displayedShows or hides the overlay.
displayNameName of overlay used as title.
floatingReturns true if overlay is floating, returns false if overlay is docked in a corner or in a toolbar.
floatingPositionLocal position of closest overlay corner to closest dockposition when floating.
idOverlay unique ID.
isInToolbarReturns true if overlay is docked in a toolbar.
layoutThe preferred layout for the Overlay.
maxSizeMaximum size of the Overlay.
minSizeMinimum size of the Overlay.
sizeSize of the Overlay.

公共函数

CloseRemove the Overlay from its OverlayCanvas.
CreateContentCreates a new VisualElement containing the contents of this Overlay.
OnCreatedOnCreated is invoked when an Overlay is instantiated in an Overlay Canvas.
OnWillBeDestroyedCalled when an Overlay is about to be destroyed.
UndockIf this Overlay is currently in a toolbar, it will be removed and return to a floating state.

Events

collapsedChangedInvoked when Overlay.collapsed value is changed.
displayedChangedThis callback is invoked when the Overlay.displayed value has been changed.
floatingChangedCalled when the value of floating has changed.
floatingPositionChangedThis event is invoked when Overlay.floatingPosition is changed.
layoutChangedSubscribe to this event to be notified when the Overlay.Layout property is modified.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961