Class PanelView
Common base class for gui drawn in panels and window tear off.
Inherited Members
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()