LoadedSceneInfo
Describes one scene loaded from a content directory, as listed in ContentLoadState.Scenes.
Read time 1 minuteLast updated a day ago
Definition
- Type: Struct
- Namespace: Unity.Loading
- Assembly: UnityEngine.ContentLoadModule
public readonly struct LoadedSceneInfo
Remarks
A scene loaded with SceneManager.LoadSceneAsync appears from the call until the scene unloads, whether game code unloads it or a later load with LoadSceneMode.Single replaces it. The files that the scene depends on stay in memory for as long as it appears. The scene's own file is not listed in ContentLoadState.Files.
Additional Resources: ContentDirectoryDiagnostics.GetContentDirectoryLoadInfo
Properties
Property | Description |
|---|---|
| DependencyCount | The number of entries in ContentLoadState.Dependencies, from LoadedSceneInfo.DependencyStartIndex, that list the files the scene depends on. |
| DependencyStartIndex | The index in ContentLoadState.Dependencies of the first file that the scene depends on. |
| Id | The id of the scene, equal to the one passed to SceneManager.LoadSceneAsync. |
| Scene | The loaded scene. |
| Status | Whether the scene is loading, has loaded, or failed to load. |