docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ArrayProperty<TContainer, TElement>

    Implements
    ICollectionProperty<TContainer, TElement[]>
    IProperty<TContainer, TElement[]>
    IProperty
    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 ArrayProperty<TContainer, TElement> : ICollectionProperty<TContainer, TElement[]>, IProperty<TContainer, TElement[]>, IProperty
    Type Parameters
    Name Description
    TContainer
    TElement

    Constructors

    ArrayProperty(string, Getter, Setter, IPropertyAttributeCollection)

    Declaration
    public ArrayProperty(string name, ArrayProperty<TContainer, TElement>.Getter getter, ArrayProperty<TContainer, TElement>.Setter setter, IPropertyAttributeCollection attributes = null)
    Parameters
    Type Name Description
    string name
    ArrayProperty<TContainer, TElement>.Getter getter
    ArrayProperty<TContainer, TElement>.Setter setter
    IPropertyAttributeCollection attributes

    Properties

    Attributes

    Returns the attributes for the given property.

    Declaration
    public readonly IPropertyAttributeCollection Attributes { get; }
    Property Value
    Type Description
    IPropertyAttributeCollection

    IsContainer

    Gets a value indicating whether the value type is a container type.

    Declaration
    public bool IsContainer { get; }
    Property Value
    Type Description
    bool

    IsReadOnly

    Gets a value indicating whether the property is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool

    Methods

    Clear(ref TContainer)

    Removes all elements from the collection.

    Declaration
    public void Clear(ref TContainer container)
    Parameters
    Type Name Description
    TContainer container

    GetCount(ref TContainer)

    Gets the number of elements contained in the collection.

    Declaration
    public int GetCount(ref TContainer container)
    Parameters
    Type Name Description
    TContainer container
    Returns
    Type Description
    int

    GetName()

    Gets the name of the property.

    Declaration
    public string GetName()
    Returns
    Type Description
    string

    GetPropertyAtIndex<TGetter>(ref TContainer, int, ref ChangeTracker, ref TGetter)

    Gets the strongly typed element at the specified index.

    Declaration
    public void GetPropertyAtIndex<TGetter>(ref TContainer container, int index, ref ChangeTracker changeTracker, ref TGetter getter) where TGetter : ICollectionElementPropertyGetter<TContainer>
    Parameters
    Type Name Description
    TContainer container
    int index
    ChangeTracker changeTracker
    TGetter getter
    Type Parameters
    Name Description
    TGetter

    GetValue(ref TContainer)

    Gets the property value for the given container.

    Declaration
    public TElement[] GetValue(ref TContainer container)
    Parameters
    Type Name Description
    TContainer container
    Returns
    Type Description
    TElement[]

    SetCount(ref TContainer, int)

    Sets the number of elements contained in the collection.

    Declaration
    public void SetCount(ref TContainer container, int count)
    Parameters
    Type Name Description
    TContainer container
    int count

    SetValue(ref TContainer, TElement[])

    Sets the property value for the given container.

    Declaration
    public void SetValue(ref TContainer container, TElement[] value)
    Parameters
    Type Name Description
    TContainer container
    TElement[] value

    Implements

    ICollectionProperty<TContainer, TValue>
    IProperty<TContainer, TValue>
    IProperty
    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)