docs.unity3d.com
    显示 / 隐藏目录

    Class PanelView

    Common base class for gui drawn in panels and window tear off.

    Inheritance
    Object
    Object
    ScriptableObject
    PanelView
    ScenePlacementPanel
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Unity.MARS
    Syntax
    [Serializable]
    public abstract class PanelView : ScriptableObject

    Fields

    RecordFoldoutAnalyticsEvent

    Action called when panel expanded has changed.

    Declaration
    public Action<bool> RecordFoldoutAnalyticsEvent
    Field Value
    Type Description
    Action<Boolean>

    Properties

    AutoRepaintOnSceneChange

    Should the panel cause the tear off window to auto repaint on scene change

    Declaration
    public abstract bool AutoRepaintOnSceneChange { get; }
    Property Value
    Type Description
    Boolean

    DrawAsWindow

    Is the panel being drawn in a tear off window.

    Declaration
    public abstract bool DrawAsWindow { get; set; }
    Property Value
    Type Description
    Boolean

    EditorWindow

    Tear off editor window the panel is attached to.

    Declaration
    public virtual EditorWindow EditorWindow { get; set; }
    Property Value
    Type Description
    EditorWindow

    HelpButtonAction

    Callback for help button Action.

    Declaration
    public virtual Action HelpButtonAction { get; }
    Property Value
    Type Description
    Action

    MaxSize

    Maximum sized of the panel

    Declaration
    public abstract Vector2 MaxSize { get; }
    Property Value
    Type Description
    Vector2

    MinSize

    Minimum size of the panel

    Declaration
    public abstract Vector2 MinSize { get; }
    Property Value
    Type Description
    Vector2

    PanelExpanded

    Is the panel currently expanded under the header.

    Declaration
    public virtual bool PanelExpanded { get; set; }
    Property Value
    Type Description
    Boolean

    PanelLabel

    Name of the panel used in the header and for tear off window name.

    Declaration
    public abstract string PanelLabel { get; }
    Property Value
    Type Description
    String

    PanelPopoutCanScroll

    Declaration
    public virtual bool PanelPopoutCanScroll { get; }
    Property Value
    Type Description
    Boolean

    PanelWindow

    Panel window the panel is attached to.

    Declaration
    public virtual EditorWindow PanelWindow { get; set; }
    Property Value
    Type Description
    EditorWindow

    PreferredSize

    Size of panel when opening as a window

    Declaration
    public abstract Vector2 PreferredSize { get; }
    Property Value
    Type Description
    Vector2

    ScrollingHorizontal

    Declaration
    public bool ScrollingHorizontal { get; set; }
    Property Value
    Type Description
    Boolean

    ScrollingVertical

    Declaration
    public bool ScrollingVertical { get; set; }
    Property Value
    Type Description
    Boolean

    SettingsButtonFunc

    Callback for popup settings panel view.

    Declaration
    public virtual Func<GenericMenu> SettingsButtonFunc { get; }
    Property Value
    Type Description
    Func<GenericMenu>

    TabMenuFunc

    Callback for Tab panel view. Override with Null if you want not drawn.

    Declaration
    public virtual Func<GenericMenu> TabMenuFunc { get; }
    Property Value
    Type Description
    Func<GenericMenu>

    UsePrefSize

    Should the panel use the preferred size when initially drawing as a window.

    Declaration
    public abstract bool UsePrefSize { get; }
    Property Value
    Type Description
    Boolean

    Methods

    AddItemsToTabMenu(GenericMenu)

    Draws the basic panel tab options. Override to add more Options to the menu popup.

    Declaration
    public virtual GenericMenu AddItemsToTabMenu(GenericMenu menu)
    Parameters
    Type Name Description
    GenericMenu menu
    Returns
    Type Description
    GenericMenu

    generic menu with options for active panel

    MenuItems()

    Used to add extra menu items to the panel view's create panel menu.

    Declaration
    protected virtual PanelView.MenuItemData[] MenuItems()
    Returns
    Type Description
    PanelView.MenuItemData[]

    The menu items to be added to the generic menu

    OnDisable()

    Declaration
    public virtual void OnDisable()

    OnEnable()

    Declaration
    public virtual void OnEnable()

    OnGUI()

    Draws the panel contents

    Declaration
    public virtual void OnGUI()

    OnSelectionChanged()

    Callback for on selection change.

    Declaration
    public abstract void OnSelectionChanged()

    Repaint()

    Calls repaint on the panel and the parent window(s).

    Declaration
    public abstract void Repaint()
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)