How to add Buttons to Save & Load a game
Last updated
Last updated
Game can only be saved if DataPersistenceManager exists in the scene.
As explained in , saving and loading games requires just a single line of code. To make it even easier, you can create buttons that handle saving and loading without writing any code.
Simply add a button to your UI and assign the component to it. This component offers two methods: SaveGame() and LoadGame(), which you can link to the button’s onClick
event.
Once set up, clicking the button will trigger the save or load function based on your needs.
Refer to for more Information.