Class SceneSystem
Inherited Members
Namespace: Unity.Scenes
Syntax
[UpdateInGroup(typeof(SceneSystemGroup))]
public class SceneSystem : ComponentSystem
Fields
k_BootstrapFileName
Declaration
public const string k_BootstrapFileName = "livelink-bootstrap.txt"
Field Value
Type | Description |
---|---|
String |
k_SceneInfoFileName
Declaration
public const string k_SceneInfoFileName = "catalog.bin"
Field Value
Type | Description |
---|---|
String |
sceneLoadRequestArchetype
Declaration
protected EntityArchetype sceneLoadRequestArchetype
Field Value
Type | Description |
---|---|
EntityArchetype |
sceneLoadRequestQuery
Declaration
protected EntityQuery sceneLoadRequestQuery
Field Value
Type | Description |
---|---|
EntityQuery |
Properties
BuildConfigurationGUID
Declaration
public Hash128 BuildConfigurationGUID { get; set; }
Property Value
Type | Description |
---|---|
Hash128 |
Methods
GetSceneEntity(Hash128)
Find the scene given a guid. For GameObject scenes, this will only return the first matching scene.
Declaration
public Entity GetSceneEntity(Hash128 sceneGUID)
Parameters
Type | Name | Description |
---|---|---|
Hash128 | sceneGUID | The guid of the scene. |
Returns
Type | Description |
---|---|
Entity | The entity for the scene. |
GetSceneGUID(String)
Get the guid for a scene path or name. This is a slow method - it is best to use the guid directly.
Declaration
public Hash128 GetSceneGUID(string scenePath)
Parameters
Type | Name | Description |
---|---|---|
String | scenePath | The scene path or name. |
Returns
Type | Description |
---|---|
Hash128 | True if the scene guid exists. |
IsSceneLoaded(Entity)
Check if a scene or subscene is loaded.
Declaration
public bool IsSceneLoaded(Entity entity)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity with the loading component data. This is the entity returned by LoadSceneAsync. |
Returns
Type | Description |
---|---|
Boolean | True if the scene is loaded. |
LoadSceneAsync(Hash128, SceneSystem.LoadParameters)
Load a scene by its asset GUID.
Declaration
public Entity LoadSceneAsync(Hash128 sceneGUID, SceneSystem.LoadParameters parameters = default(SceneSystem.LoadParameters))
Parameters
Type | Name | Description |
---|---|---|
Hash128 | sceneGUID | The guid of the scene. |
SceneSystem.LoadParameters | parameters | The load parameters for the scene. |
Returns
Type | Description |
---|---|
Entity | An entity representing the loading state of the scene. |
OnCreate()
Declaration
protected override void OnCreate()
Overrides
OnUpdate()
Declaration
protected override void OnUpdate()
Overrides
UnloadScene(Entity, SceneSystem.UnloadParameters)
Unload the scene.
Declaration
public void UnloadScene(Entity sceneEntity, SceneSystem.UnloadParameters unloadParams = SceneSystem.UnloadParameters.Default)
Parameters
Type | Name | Description |
---|---|---|
Entity | sceneEntity | The entity for the scene. |
SceneSystem.UnloadParameters | unloadParams | Parameters controlling the unload process. These are ignored for GameObject scenes. |
UnloadScene(Hash128, SceneSystem.UnloadParameters)
Unload a SubScene by GUID. If this is called on a GameObject scene, it will only unload the first matching scene.
Declaration
public void UnloadScene(Hash128 sceneGUID, SceneSystem.UnloadParameters unloadParams = SceneSystem.UnloadParameters.Default)
Parameters
Type | Name | Description |
---|---|---|
Hash128 | sceneGUID | The guid of the scene. |
SceneSystem.UnloadParameters | unloadParams | Parameters controlling the unload process. These are ignored for GameObject scenes. |