docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct UnmanagedProperty<TContainer, TValue>

    Implements
    IUnmanagedProperty
    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 readonly struct UnmanagedProperty<TContainer, TValue> : IUnmanagedProperty, IProperty<TContainer, TValue>, IProperty where TContainer : struct where TValue : unmanaged
    Type Parameters
    Name Description
    TContainer
    TValue

    Constructors

    UnmanagedProperty(string, int, bool, IPropertyAttributeCollection)

    Declaration
    public UnmanagedProperty(string name, int offset, bool readOnly = false, IPropertyAttributeCollection attributes = null)
    Parameters
    Type Name Description
    string name
    int offset
    bool readOnly
    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

    Offset

    Declaration
    public int Offset { get; }
    Property Value
    Type Description
    int

    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

    IUnmanagedProperty
    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)