Class SceneService
Provides common scene helper functions
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 |
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 |
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 |