A class in Root.Township, the global namespace.
Loads a list of scenes (by default System Managers), additively unless set otherwise, skipping any already loaded or loaded before by any LoadScenes.
Constructors
| Member | What it is |
|---|
LoadScenes() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|
private static HashSet<string> allScenes | Static set of scene names loaded or requested so far. |
private float delay | Seconds to wait before loading. 0 or less loads at once (default -1). |
private bool isLoadAsync | Load with LoadSceneAsync instead of LoadScene. |
private bool isLoadingOnAwake | Load automatically in Awake (default true). |
private LoadSceneMode loadSceneMode | Unity load mode (default additive). |
private static Logger logger | Class logger, logs each scene loaded. |
private string[] scenesToLoad | Names of the scenes to load. |
Methods
| Member | What it is |
|---|
void Load() | Loads the scenes now, or after delay seconds if it is above 0. |
4 private and internal methods
| Member | What it is |
|---|
private void Awake() | Loads the scenes if isLoadingOnAwake is set. |
private void InitializeScenes() | On first use, fills the shared set with the scenes already open. |
private void LoadSceneArray(string[] scenes) | Loads each scene not yet in the shared set, sync or async, and adds it to the set. |
private IEnumerator SceneDelay() (iterator) | Coroutine: waits delay seconds, then loads the scenes. |
Used in
Members of other types that take, return or hold a LoadScenes: