docs.unity.cn
    Show / Hide Table of Contents

    Operator Implicit

    Implicit(T to UnityObjectRef<T>)

    Implicitly converts an Object to an UnityObjectRef<T>.

    Declaration
    public static implicit operator UnityObjectRef<T>(T instance)
    Parameters
    Type Name Description
    T instance

    Instance of the Object to store as a reference.

    Returns
    Type Description
    UnityObjectRef<T>

    A UnityObjectRef referencing instance

    Implicit(UnityObjectRef<T> to T)

    Implicitly converts an UnityObjectRef<T> to an Object.

    Declaration
    public static implicit operator T(UnityObjectRef<T> unityObjectRef)
    Parameters
    Type Name Description
    UnityObjectRef<T> unityObjectRef

    Reference used to access the Object.

    Returns
    Type Description
    T

    The instance of type T referenced by unityObjectRef.

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