Documentation

Unity Engine

Download Unity

Unity Engine

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.

Properties

Property

Description

DependencyCountThe number of entries in ContentLoadState.Dependencies, from LoadedSceneInfo.DependencyStartIndex, that list the files the scene depends on.
DependencyStartIndexThe index in ContentLoadState.Dependencies of the first file that the scene depends on.
IdThe id of the scene, equal to the one passed to SceneManager.LoadSceneAsync.
SceneThe loaded scene.
StatusWhether the scene is loading, has loaded, or failed to load.