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