I'm currently refactoring all the old garbage code in my project and was looking at integrating my level/scene manager code with Dialogue System's functionality. Currently, each of my scenes has a level manager that does the following.
- Receives references to the player and other important gameObjects components from a DontDestroyOnLoad game manager object and assigns them where needed.
- Saves and loads the contents of lootable chests and containers within the scene, so if the chest has been modified it remembers its contents between loads
- Remembers the state of special enemies and bosses and prevents them from respawning if required (say they have been defeated)
I will probably have to expand the functionality of the manager in the future, especially once I start looking into fleshing out a 'story' manager and having to spawn and edit NPCs into different areas to play cutscenes and dialogue, etc.
I have a couple of questions regarding the save system and what it does and doesn't support:
- I understand we can make our own custom savers from the provided templates and plan to do so for saving chest contents. The documentation also says we need to assign unique keys for each saved object. If I have Chest 1, Chest 2 and Chest 3 in Scene 1, and then Chest 4, Chest 5, Chest 6 in Scene 2, would Assign Unique Keys remember the chests in Scene 1 and automatically assign unique names, or would it assign 1, 2 and 3 again and overwrite the chests in the first scene once I save the 2nd scene?
- This is more out of curiosity but does each saved object generate a new file, or does the save manager package everything together into a single file?
- I am guessing we need to use the Spawned Object Manager for spawning unique enemies/bosses that are spawned once or disappear in certain conditions. In the example screenshot it looks like we only need to specify the prefab. How do we specify the position or other parameters for the prefab to be spawned?
- What sort of functionality would I have to look into for implementing 'progression' along a linear story? For example, maybe some important characters will appear in a zone after the player defeats a boss or completes a quest, or a new part of a level is opened up, etc.