Class SceneService | Project Tiny | 0.29.0-preview.22
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

    GetSceneStatus(World, Entity)

    Retrieves the status of a scene load request.

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

    Pass in the entity returned from LoadSceneAsync

    Returns
    Type Description
    SceneStatus

    LoadSceneAsync(World, SceneReference)

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

    Declaration
    public static Entity LoadSceneAsync(World world, SceneReference sceneReference)
    Parameters
    Type Name Description
    Unity.Entities.World world
    Unity.Entities.SceneReference sceneReference
    Returns
    Type Description
    Unity.Entities.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
    Unity.Entities.World world
    Unity.Entities.Entity scene

    UnloadAllSceneInstances(World, SceneReference)

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

    Declaration
    public static void UnloadAllSceneInstances(World world, SceneReference sceneReference)
    Parameters
    Type Name Description
    Unity.Entities.World world
    Unity.Entities.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
    Unity.Entities.World world
    Unity.Entities.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