Level Manager

Component > Dialogue System > Save System > Level Manager

Level Manager records the player's current level into the Lua environment and provides methods to load games into the correct level.

Properties

Property Function
Default Starting Level The level to load if the saved game hasn't yet recorded a current level for the player

Details

If your player can move between levels, add the Level Manager component to your Dialogue Manager object.

While the name doesn't start with PersistentData, this component acts like a persistent data component. It records the player's current level in Variable["SavedLevelName"] so it can reload the player's current level when reloading a game using the Game Saver component or the LevelManager.LoadGame() method. Add it to the Dialogue Manager so it's not destroyed between level loads.

LevelManager calls PersistentDataManager.LevelWillBeUnloaded() for you.

The scene in the Examples/Save Load Example folder demonstrates the use of Level Manager.


<< Components