Infinite Saves

Learn how to set up infinite saves for your Unity game.

As of v1.0.1, there is an infinite saves example scene in Assets/StylishEsper/ESave/Examples/Any RP Examples.

For this tutorial, the UI setup in ESaveInfiniteSavesExample scene will be used as a reference.

Prerequisites

You will need some sort of UI setup that can support infinite saves. Generally, a scroll view is required for this case. The scroll view will be populated with save slot buttons and one save slot creator button.

You will need a way to switch the mode of the save window. For this example, we will be using a toggle.

Create UI Objects

We will start by creating a UI button that will both load and overwrite data. This will be a prefab. You can make a prefab by dragging the object into the project window.

After that, create a button that will create save slots. This does not need to be a prefab. Both buttons will be children of the scroll view's content.

Delete the save slot button from the hierarchy, as it will be instantiated at runtime.

For this example, we will be using a toggle that will change the mode of the save window, which will just sit at the right of the scroll view.

The data we will be saving will only be the time elapsed. So, there is a text object below the scroll view that will display the current time elapsed.

Last updated