i writing my code for the save game progress, i able to save my player position and player score and health. I want my save game load from the main menu. Anyone can help me? i got 4 scene which is 1 main menu and 3 level.
i writing my code for the save game progress, i able to save my player position and player score and health. I want my save game load from the main menu. Anyone can help me? i got 4 scene which is 1 main menu and 3 level.
Don't forget to call PlayerPrefs.Save(). I've definitely done that a few times.
i added this into my save function, but the problem is i cannot load my game in the main menu...and another problem is with this code i no able to save many enemies. it just save one enemy, can you help me with that?
For Finding multiple enemies, I hope you tagged them as "Enemy", or something similar to that, with that in mind:
(Oh, according to Unity you need to write an abstraction Layer to PlayerPrefs to save multiple so think about doing it as a peasant)
Add StreamReader to read the save file from main menu, lets say Line one to point the scene and set bool Load for instance for scene Main Controllers cript to know to read the rest of the file, then just do the same thing you did for saving only in reverse to return everything the way it was in the scene.
Or run it like XML file that is a lot more elegant.