SaveSystem Class
- Namespace
- Studio23.SS2.SaveSystem.Core
public class SaveSystem : MonoBehaviour
- Inheritance
-
SaveSystem
Fields
Methods
- ClearAllCloudSlots()
Clears All Cloud Slots
- ClearAllSlots()
Clears All Slots
- ClearSelectedSlot()
Clears selected slot from local
- ClearSelectedSlotCloud()
Clears selected slot from cloud
- GetSelectedSlotSeed()
Get the seed from selected slot. Reminder It's only saved when the game is saved for the first time.
- GetSlotMeta(int)
Returns Slot metadata for the given index. If it exists locally then returns that. If it doesn't exists creates a new slot meta and returns that
- Load()
Loads All ISavable
- Load(ISaveable)
This is for Loading a component Externally
- Load(List<ISaveable>)
Loads Savables in the order they are given in the list
- RestoreBackup()
Restores Backup if available If not available locally attempts to restore from cloud if still fails then throws error Wrap in try catch and show proper UI
- Save(string, bool)
By Default it saves all savable regardless of it's state If DirtyOnly is passed then it only saves Those who's state is dirty On Save All ISavable's IsDirty is set to false And attempts to save the files to cloud accordingly with the given provider
- SelectLastSelectedSlot()
Selects Last Selected Slot from PlayerPrefs. If not found selects 0 index
- SelectSlot(int)
Selects Save Slot