Struct MemoryRef<T> | Kinematica | 0.8.0-preview
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>

    Equals(ref T)

    Declaration
    public bool Equals(ref T other)
    Parameters
    Type Name Description
    T other
    Returns
    Type Description
    Boolean
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Monday, August 3, 2020