Hi Tony,
Wondering how i can call the scene which is in my saved file? Looking through the docs, I found this under SavedGameData: String PixelCrushers.SavedGameData.sceneName
How can I go about calling it, or assign it to a variable, if I were loading a scene in a custom script? As in, something like:
Application.LoadLevel(PixelCrushers.SavedGameData.sceneName)
I'm still learning coding, and when i try this code, i need to add an object reference - but not sure how to reference my save file as opposed to creating a new reference of SavedGameData?
If it's not too much trouble, it would be good to know how to access other data in the save file as well (values from the keys)
Hope that's clear....
Calling the scene from my saved file
Re: Calling the scene from my saved file
Hi,
Get the saved game data and access its sceneName field:
Get the saved game data and access its sceneName field:
Code: Select all
SavedGameData savedGameData = SaveSystem.storer.RetrieveSavedGameData(slotNumber);
Debug.Log("Game was saved in scene: " + savedGameData.sceneName;
Re: Calling the scene from my saved file
Perfect! As always, thank you for your help
Re: Calling the scene from my saved file
Happy to help!