docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ValueProperty<TContainer, TValue>

    Implements
    IProperty<TContainer, TValue>
    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 ValueProperty<TContainer, TValue> : IProperty<TContainer, TValue>, IProperty
    Type Parameters
    Name Description
    TContainer
    TValue

    Constructors

    ValueProperty(string, Getter, Setter, IPropertyAttributeCollection)

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

    Properties

    Attributes

    Returns the attributes for the given property.

    Declaration
    public 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

    GetName()

    Gets the name of the property.

    Declaration
    public string GetName()
    Returns
    Type Description
    string

    GetValue(ref TContainer)

    Gets the property value for the given container.

    Declaration
    public TValue GetValue(ref TContainer container)
    Parameters
    Type Name Description
    TContainer container
    Returns
    Type Description
    TValue

    SetValue(ref TContainer, TValue)

    Sets the property value for the given container.

    Declaration
    public void SetValue(ref TContainer container, TValue value)
    Parameters
    Type Name Description
    TContainer container
    TValue value

    Implements

    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)