How to add Buttons to Save & Load a game

As explained in Save & Load Games Programmatically, 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 SaveLoadButton 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.

CowsinsButton inherits from Unity´s Button

Refer to SaveLoadButton for more Information.

Last updated