This component combines Application.LoadLevel[Async] with the saved-game data features of PersistentDataManager.
More...
This component combines Application.LoadLevel[Async] with the saved-game data features of PersistentDataManager.
To use it, add it to your Dialogue Manager object and pass the saved-game data to LevelManager.LoadGame().
◆ Awake()
virtual void PixelCrushers.DialogueSystem.LevelManager.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ LoadGame()
void PixelCrushers.DialogueSystem.LevelManager.LoadGame |
( |
string |
saveData | ) |
|
Loads the game recorded in the provided saveData.
- Parameters
-
◆ LoadLevel() [1/2]
void PixelCrushers.DialogueSystem.LevelManager.LoadLevel |
( |
int |
levelIndex | ) |
|
Loads a level.
Use to change levels while keeping data synced. This method also calls PersistentDataManager.Record() before changing levels and PersistentDataManager.Apply() after changing levels. After loading the level, it waits two frames to allow GameObjects to finish their initialization first.
- Parameters
-
levelIndex | Scene index in build settings. |
◆ LoadLevel() [2/2]
void PixelCrushers.DialogueSystem.LevelManager.LoadLevel |
( |
string |
levelName | ) |
|
Loads a level.
Use to change levels while keeping data synced. This method also calls PersistentDataManager.Record() before changing levels and PersistentDataManager.Apply() after changing levels. After loading the level, it waits two frames to allow GameObjects to finish their initialization first.
- Parameters
-
◆ OnDisable()
virtual void PixelCrushers.DialogueSystem.LevelManager.OnDisable |
( |
| ) |
|
|
protectedvirtual |
◆ OnEnable()
virtual void PixelCrushers.DialogueSystem.LevelManager.OnEnable |
( |
| ) |
|
|
protectedvirtual |
◆ OnRecordPersistentData()
virtual void PixelCrushers.DialogueSystem.LevelManager.OnRecordPersistentData |
( |
| ) |
|
|
virtual |
Records the current level in Lua.
◆ RestartGame()
void PixelCrushers.DialogueSystem.LevelManager.RestartGame |
( |
| ) |
|
Restarts the game at the default starting level and resets the Dialogue System to its initial database state.
◆ defaultStartingLevel
string PixelCrushers.DialogueSystem.LevelManager.defaultStartingLevel |
The default starting level to use if none is recorded in the saved-game data.
◆ IsLoading
bool PixelCrushers.DialogueSystem.LevelManager.IsLoading |
|
get |
Indicates whether a level is currently loading.
Only useful in Unity Pro, which uses Application.LoadLevelAsync().
true
if loading; otherwise, false
.
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Source/Assets/Dialogue System/Scripts/Supplemental/Save System/LevelManager.cs