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

    Class ComponentMenuAttribute

    Used to define the menu item and the type of component it will add.

    Inheritance
    Object
    Attribute
    ComponentMenuAttribute
    MonoBehaviourComponentMenuAttribute
    Namespace: Unity.MARS
    Syntax
    [AttributeUsage(AttributeTargets.Class)]
    public abstract class ComponentMenuAttribute : Attribute, _Attribute

    Constructors

    ComponentMenuAttribute(Type, String)

    Create an individual Menu item that is connected to component type.

    Declaration
    protected ComponentMenuAttribute(Type componentType, string menuItem)
    Parameters
    Type Name Description
    Type componentType

    Type of component to add.

    String menuItem

    Menu path for the item.

    Fields

    componentType

    Type of component the menu will add.

    Declaration
    public readonly Type componentType
    Field Value
    Type Description
    Type

    menuItem

    The menu item path.

    Declaration
    public readonly string menuItem
    Field Value
    Type Description
    String
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)