Search Results for

    Show / Hide Table of Contents

    Class AddTypeMenuAttribute

    An attribute that overrides the name of the type displayed in the SubclassSelector popup.

    The following is a sample of applying the AddTypeMenu attribute to a class that implements IEntry.

    [AddTypeMenu("Example/Example Data")]
    [Serializable]
    public class ExampleData : IEntry { ... }

    Inheritance
    Object
    Attribute
    AddTypeMenuAttribute
    Namespace: MackySoft.UniData
    Assembly: cs.temp.dll.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
    public sealed class AddTypeMenuAttribute : Attribute, _Attribute

    Constructors

    AddTypeMenuAttribute(String, Int32)

    Declaration
    public AddTypeMenuAttribute(string menuName, int order = 0)
    Parameters
    Type Name Description
    String menuName
    Int32 order

    Properties

    MenuName

    Declaration
    public string MenuName { get; }
    Property Value
    Type Description
    String

    Order

    Declaration
    public int Order { get; }
    Property Value
    Type Description
    Int32

    Methods

    GetSplittedMenuName()

    Returns the MenuName splitted by '/'.

    Declaration
    public string[] GetSplittedMenuName()
    Returns
    Type Description
    String[]

    GetTypeNameWithoutPath()

    Returns the display name without the path.

    Declaration
    public string GetTypeNameWithoutPath()
    Returns
    Type Description
    String
    In This Article
    Back to top UniData - Data Management for Unity