Struct PropertyAttributeCollection | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Struct PropertyAttributeCollection

    Default container to pass property attributes.

    Namespace: Unity.Properties
    Syntax
    public struct PropertyAttributeCollection : IPropertyAttributeCollection

    Constructors

    PropertyAttributeCollection(Attribute[])

    Declaration
    public PropertyAttributeCollection(Attribute[] attributes)
    Parameters
    Type Name Description
    System.Attribute[] attributes

    Methods

    GetAttribute<TAttribute>()

    Returns the first attribute of the given type.

    Declaration
    public TAttribute GetAttribute<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    TAttribute
    Type Parameters
    Name Description
    TAttribute
    Implements
    IPropertyAttributeCollection.GetAttribute<TAttribute>()

    GetAttributes<TAttribute>()

    Returns all attribute of the given type.

    Declaration
    public IEnumerator<TAttribute> GetAttributes<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<TAttribute>
    Type Parameters
    Name Description
    TAttribute
    Implements
    IPropertyAttributeCollection.GetAttributes<TAttribute>()

    HasAttribute<TAttribute>()

    Returns true if the property has any attributes of the given type.

    Declaration
    public bool HasAttribute<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    TAttribute
    Implements
    IPropertyAttributeCollection.HasAttribute<TAttribute>()
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX