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

    Struct PanelView.MenuItemData

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

    Namespace: Unity.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 readonly GUIContent Content { get; }
    Property Value
    Type Description
    GUIContent

    Func

    Callback function, called when a menu item is selected.

    Declaration
    public readonly 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 readonly bool On { get; }
    Property Value
    Type Description
    Boolean
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)