Class SceneService
Provides common scene helper functions
Inheritance
System.Object
SceneService
Namespace: Unity.Tiny.Scenes
Syntax
public class SceneService
Fields
ConfigurationAssetPath
Declaration
public static readonly string ConfigurationAssetPath
Field Value
Type | Description |
---|---|
System.String |
Methods
GetSceneStatus(Entity)
Retrieves the status of a scene load request.
Declaration
public static SceneStatus GetSceneStatus(Entity scene)
Parameters
Type | Name | Description |
---|---|---|
Entity | scene | Pass in the entity returned from |
Returns
Type | Description |
---|---|
SceneStatus |
LoadSceneAsync(SceneReference)
Creates a request to load the scene provided by the passed SceneReference
argument.
Declaration
public static Entity LoadSceneAsync(SceneReference sceneReference)
Parameters
Type | Name | Description |
---|---|---|
SceneReference | sceneReference |
Returns
Type | Description |
---|---|
Entity | A new Entity with a |
UnloadAllSceneInstances(Entity)
Unloads all scene instances of the same type as the scene the passed in entity belongs to.
Declaration
public static void UnloadAllSceneInstances(Entity scene)
Parameters
Type | Name | Description |
---|---|---|
Entity | scene |
UnloadAllSceneInstances(SceneReference)
Unloads all scene instances of the same type as the SceneReference
passed in.
Declaration
public static void UnloadAllSceneInstances(SceneReference sceneReference)
Parameters
Type | Name | Description |
---|---|---|
SceneReference | sceneReference |
UnloadSceneInstance(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(Entity sceneEntity)
Parameters
Type | Name | Description |
---|---|---|
Entity | sceneEntity |