Struct UnityObjectReference | Unity Runtime Scene Serialization | 0.1.4-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Struct UnityObjectReference

    Namespace: Unity.RuntimeSceneSerialization
    Syntax
    public struct UnityObjectReference

    Fields

    fileId

    Declaration
    public long fileId
    Field Value
    Type Description
    Int64

    guid

    Declaration
    public string guid
    Field Value
    Type Description
    String

    InvalidSceneID

    Declaration
    public const int InvalidSceneID = -1
    Field Value
    Type Description
    Int32

    NullObjectReference

    Declaration
    public static readonly UnityObjectReference NullObjectReference
    Field Value
    Type Description
    UnityObjectReference

    sceneID

    Declaration
    public int sceneID
    Field Value
    Type Description
    Int32

    Methods

    CreateArrayProperty<TContainer, TElement>(String, Boolean, String)

    Declaration
    public static UnityObjectReferenceArrayProperty<TContainer, TElement> CreateArrayProperty<TContainer, TElement>(string memberName, bool isProperty, string containerName)
        where TElement : Object
    Parameters
    Type Name Description
    String memberName
    Boolean isProperty
    String containerName
    Returns
    Type Description
    UnityObjectReferenceArrayProperty<TContainer, TElement>
    Type Parameters
    Name Description
    TContainer
    TElement

    CreateListProperty<TContainer, TElement>(String, Boolean, String)

    Declaration
    public static UnityObjectReferenceListProperty<TContainer, TElement> CreateListProperty<TContainer, TElement>(string memberName, bool isProperty, string containerName)
        where TElement : Object
    Parameters
    Type Name Description
    String memberName
    Boolean isProperty
    String containerName
    Returns
    Type Description
    UnityObjectReferenceListProperty<TContainer, TElement>
    Type Parameters
    Name Description
    TContainer
    TElement

    CreateValueProperty<TContainer>(String, Boolean, String)

    Declaration
    public static UnityObjectReferenceValueProperty<TContainer> CreateValueProperty<TContainer>(string memberName, bool isProperty, string containerName)
    Parameters
    Type Name Description
    String memberName
    Boolean isProperty
    String containerName
    Returns
    Type Description
    UnityObjectReferenceValueProperty<TContainer>
    Type Parameters
    Name Description
    TContainer

    GetAsset(String, Int64, AssetPack)

    Declaration
    public static Object GetAsset(string guid, long fileId, AssetPack assetPack)
    Parameters
    Type Name Description
    String guid
    Int64 fileId
    AssetPack assetPack
    Returns
    Type Description
    Object

    GetObject(UnityObjectReference)

    Declaration
    public static Object GetObject(UnityObjectReference objectReference)
    Parameters
    Type Name Description
    UnityObjectReference objectReference
    Returns
    Type Description
    Object

    GetReferenceForObject(Object)

    Declaration
    public static UnityObjectReference GetReferenceForObject(Object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    UnityObjectReference

    GetSceneObject(Int32)

    Declaration
    public static Object GetSceneObject(int sceneID)
    Parameters
    Type Name Description
    Int32 sceneID
    Returns
    Type Description
    Object

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()
    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