docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PanelView

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

    Inheritance
    object
    Object
    ScriptableObject
    PanelView
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    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, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.MARS
    Assembly: Unity.MARS.Editor.dll
    Syntax
    [Serializable]
    [MovedFrom("Unity.MARS")]
    public abstract class PanelView : ScriptableObject

    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
    bool

    DrawAsWindow

    Is the panel being drawn in a tear off window.

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

    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
    bool

    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

    Does the panel popout support scrolling

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

    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

    Does the panel scroll horizontally

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

    ScrollingVertical

    Does the panel scroll Vertically

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

    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
    bool

    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

    MenuItems()

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

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

    The menu items to be added to the generic menu

    OnDisable()

    This function is called when the scriptable object goes out of scope.

    Declaration
    public virtual void OnDisable()

    OnEnable()

    This function is called when the object is loaded.

    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()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)