Struct PropertyAttributeCollection | Properties | 0.10.4-preview
docs.unity3d.com
    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
    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 IEnumerable<TAttribute> GetAttributes<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    IEnumerable<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
    Boolean
    Type Parameters
    Name Description
    TAttribute
    Implements
    IPropertyAttributeCollection.HasAttribute<TAttribute>()
    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