docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PanelView.MenuItemData

    Single menu item for a generic menu in the panel view.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.MARS
    Assembly: Unity.MARS.Editor.dll
    Syntax
    protected struct PanelView.MenuItemData

    Constructors

    MenuItemData(GUIContent, bool, MenuFunction)

    Creates Menu Item Data for use in a generic menu in the panel view

    Declaration
    public MenuItemData(GUIContent content, bool on, GenericMenu.MenuFunction func)
    Parameters
    Type Name Description
    GUIContent content

    The GUIContent to add as a menu item.

    bool on

    Specifies whether to show the item is currently activated (i.e. a tick next to the item in the menu).

    GenericMenu.MenuFunction func

    Callback function, called when a menu item is selected.

    Properties

    Content

    The GUIContent to add as a menu item.

    Declaration
    public GUIContent Content { get; }
    Property Value
    Type Description
    GUIContent

    Func

    Callback function, called when a menu item is selected.

    Declaration
    public GenericMenu.MenuFunction Func { get; }
    Property Value
    Type Description
    GenericMenu.MenuFunction

    On

    Specifies whether to show the item is currently activated (i.e. a tick next to the item in the menu).

    Declaration
    public bool On { get; }
    Property Value
    Type Description
    bool
    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)