Struct SceneSystem
High level API for loading and unloading scenes
Namespace: Unity.Scenes
Assembly: Unity.Scenes.dll
Syntax
[WorldSystemFilter(WorldSystemFilterFlags.Default|WorldSystemFilterFlags.Editor|WorldSystemFilterFlags.Streaming, WorldSystemFilterFlags.Default)]
[UpdateInGroup(typeof(SceneSystemGroup))]
[BurstCompile]
public struct SceneSystem : ISystem, ISystemStartStop
Methods
Name | Description |
---|---|
GetSceneEntity(WorldUnmanaged, Hash128) | Find the scene given a guid. This will only return the first matching scene. |
GetSceneGUID(ref SystemState, string) | Get the guid for a scene path or name. This is a slow method - it is best to use the guid directly. |
GetSceneStreamingState(WorldUnmanaged, Entity) | Check the streaming state of a scene that is being loaded. |
GetSectionStreamingState(WorldUnmanaged, Entity) | Check the streaming state of a section that is being loaded. |
IsSceneLoaded(WorldUnmanaged, Entity) | Check if a scene or subscene is loaded. |
IsSectionLoaded(WorldUnmanaged, Entity) | Check if a section of a subscene is loaded. |
LoadPrefabAsync(WorldUnmanaged, EntityPrefabReference, LoadParameters) | Load a prefab by its weak reference id. A PrefabRoot component is added to the returned entity when the load completes. |
LoadSceneAsync(WorldUnmanaged, Entity, LoadParameters) | Loads a scene. |
LoadSceneAsync(WorldUnmanaged, Hash128, LoadParameters) | Load a scene or prefab by its asset GUID. When loading a prefab a PrefabRoot component is added to the scene entity when the load completes. |
LoadSceneAsync(WorldUnmanaged, EntitySceneReference, LoadParameters) | Load a scene by its weak reference id. |
OnCreate(ref SystemState) | Callback invoked when the system is created. |
OnCreateForCompiler(ref SystemState) | Generated by compilation pipeline and used internally. |
OnDestroy(ref SystemState) | Callback invoked when the system is destroyed. |
OnStartRunning(ref SystemState) | Callback invoked when the system starts running. |
OnStopRunning(ref SystemState) | Callback invoked when the system stops running. |
OnUpdate(ref SystemState) | Callback invoked when the system is updated. |
UnloadScene(WorldUnmanaged, Entity, UnloadParameters) | Unload the scene. |
UnloadScene(WorldUnmanaged, Hash128, UnloadParameters) | Unload a SubScene by GUID. This will only unload the first matching scene. |
UnloadScene(WorldUnmanaged, EntityPrefabReference, UnloadParameters) | Unload a SubScene by its weak reference id. This will only unload the first matching scene. |