docs.unity.cn
    Show / Hide Table of Contents

    Struct WeakObjectSceneReference

    Weak reference to a scene. The Result field can be accessed after the scene has completed loading.

    Namespace: Unity.Entities.Content
    Syntax
    [Serializable]
    public struct WeakObjectSceneReference : IEquatable<WeakObjectSceneReference>

    Fields

    Name Description
    Id

    The reference Id.

    Properties

    Name Description
    IsReferenceValid

    Returns true if the reference has a valid id. In the editor, additional checks for the correct GenerationType and the existence of the referenced asset are performed.

    LoadingStatus

    True if the object is either being loaded or already finished loading.

    SceneFileResult

    The ContentSceneFile that was loaded. This can be used to manually integrate the loaded scene at the end of the frame.

    SceneResult

    The loaded scene object.

    Methods

    Name Description
    Equals(WeakObjectSceneReference)
    GetHashCode()

    Returns the hash code of this reference.

    LoadAsync(ContentSceneParameters)

    Loads a scene.

    Release()

    Releases the object. This will decrement the reference count of this object. When an objects reference count reaches 0, the archive file is released. The archive file is only unloaded when its reference count reaches zero, which will then release the archive it was loaded from. Archives will be unmounted when their reference count reaches 0.

    ToString()

    String conversion override.

    Unload(ref Scene)

    Unloads a scene.

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