docs.unity3d.com
    Show / Hide Table of Contents

    Struct PanelView.MenuItemData

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

    Namespace: UnityEditor.MARS
    Syntax
    protected struct MenuItemData

    Constructors

    MenuItemData(GUIContent, Boolean, GenericMenu.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.

    Boolean 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
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023