docs.unity.cn
    Show / Hide Table of Contents

    Interface IProperty<TContainer>

    Base interface for working with properties.

    Inherited Members
    IProperty.Name
    IProperty.IsReadOnly
    IProperty.DeclaredValueType()
    IProperty.HasAttribute<TAttribute>()
    IProperty.GetAttribute<TAttribute>()
    IProperty.GetAttributes<TAttribute>()
    IProperty.GetAttributes()
    IPropertyAccept<TContainer>.Accept(IPropertyVisitor, TContainer)
    Namespace: Unity.Properties
    Syntax
    public interface IProperty<TContainer> : IProperty, IPropertyAccept<TContainer>
    Type Parameters
    Name Description
    TContainer

    The container type this property operates on.

    Remarks

    This is used to pass or store properties without knowing the underlying value type.

    • Property<TContainer, TValue>

    Methods

    GetValue(ref TContainer)

    Returns the property value of a specified container.

    Declaration
    object GetValue(ref TContainer container)
    Parameters
    Type Name Description
    TContainer container

    The container whose property value will be returned.

    Returns
    Type Description
    Object

    The property value of the given container.

    SetValue(ref TContainer, Object)

    Sets the property value of a specified container.

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

    The container whose property value will be set.

    Object value

    The new property value.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, July 26, 2023