Struct MemoryRef<T> | Kinematica | 0.5.0-preview.1
docs.unity.cn
    Show / Hide Table of Contents

    Struct MemoryRef<T>

    A memory reference allows a ref value to be stored in memory and later to be converted back into its ref value.

    Namespace: Unity.Kinematica
    Syntax
    public struct MemoryRef<T>
        where T : struct
    Type Parameters
    Name Description
    T

    Constructors

    MemoryRef(ref T)

    Constructs a new memory reference from a ref value.

    Declaration
    public MemoryRef(ref T target)
    Parameters
    Type Name Description
    T target

    The ref value that this memory reference should be constructed for.

    Properties

    IsValid

    Determines if the given memory reference is valid or not.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    True if the memory reference is valid; false otherwise.

    Null

    Invalid memory reference.

    Declaration
    public static MemoryRef<T> Null { get; }
    Property Value
    Type Description
    MemoryRef<T>

    Ref

    Retrieves the original ref value from the memory reference.

    Declaration
    public T Ref { get; }
    Property Value
    Type Description
    T

    Methods

    Create(ref T)

    Constructs a new memory reference from a ref value.

    Declaration
    public static MemoryRef<T> Create(ref T target)
    Parameters
    Type Name Description
    T target

    The ref value that this memory reference should be constructed for.

    Returns
    Type Description
    MemoryRef<T>

    Operators

    Implicit(MemoryHeader<T> to MemoryRef<T>)

    Construct a new memory reference from a memory header

    Declaration
    public static implicit operator MemoryRef<T>(MemoryHeader<T> value)
    Parameters
    Type Name Description
    MemoryHeader<T> value

    The memory header that this memory reference should be constructed for.

    Returns
    Type Description
    MemoryRef<T>
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX