Class SceneService | Project Tiny | 0.21.0-preview.3
docs.unity3d.com
    Show / Hide Table of Contents

    Class SceneService

    Provides common scene helper functions

    Inheritance
    Object
    SceneService
    Namespace: Unity.Tiny.Scenes
    Syntax
    public class SceneService

    Methods

    AreStartupScenesLoaded(World)

    Check that all startup scenes have been loaded

    Declaration
    public static bool AreStartupScenesLoaded(World world)
    Parameters
    Type Name Description
    World world
    Returns
    Type Description
    Boolean

    GetSceneStatus(World, Entity)

    Retrieves the status of a scene load request.

    Declaration
    public static SceneStatus GetSceneStatus(World world, Entity scene)
    Parameters
    Type Name Description
    World world
    Entity scene

    Pass in the entity returned from LoadSceneAsync

    Returns
    Type Description
    SceneStatus

    LoadSceneAsync(World, Entities.Runtime.SceneReference)

    Creates a request to load the scene provided by the passed SceneReference argument.

    Declaration
    public static Entity LoadSceneAsync(World world, Entities.Runtime.SceneReference sceneReference)
    Parameters
    Type Name Description
    World world
    Unity.Entities.Runtime.SceneReference sceneReference
    Returns
    Type Description
    Entity

    A new Entity with a SceneData component which should be stored for use in GetSceneStatus

    UnloadAllSceneInstances(World, Entity)

    Unloads all scene instances of the same type as the scene the passed in entity belongs to.

    Declaration
    public static void UnloadAllSceneInstances(World world, Entity scene)
    Parameters
    Type Name Description
    World world
    Entity scene

    UnloadAllSceneInstances(World, Entities.Runtime.SceneReference)

    Unloads all scene instances of the same type as the SceneReference passed in.

    Declaration
    public static void UnloadAllSceneInstances(World world, Entities.Runtime.SceneReference sceneReference)
    Parameters
    Type Name Description
    World world
    Unity.Entities.Runtime.SceneReference sceneReference

    UnloadSceneInstance(World, Entity)

    Unloads the scene instance for the provided entity. As such, the entity passed in must belong to a scene otherwise this function will throw.

    Declaration
    public static void UnloadSceneInstance(World world, Entity sceneEntity)
    Parameters
    Type Name Description
    World world
    Entity sceneEntity
    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