Struct MemoryRef<T> | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    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 © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023