docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PropertyAttributeCollection

    Interface for accessing attributes for properties.

    Implements
    IPropertyAttributeCollection
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Properties
    Assembly: Unity.Properties.dll
    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

    GetAttributes<TAttribute>()

    Returns all attribute of the given type.

    Declaration
    public IEnumerator<TAttribute> GetAttributes<TAttribute>() where TAttribute : Attribute
    Returns
    Type Description
    IEnumerator<TAttribute>
    Type Parameters
    Name Description
    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
    bool
    Type Parameters
    Name Description
    TAttribute

    Implements

    IPropertyAttributeCollection
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)