VGDC 2025-2026 Club Game
Loading...
Searching...
No Matches
SaveManager Class Reference

Singleton class to be called for saving and loading. More...

Inheritance diagram for SaveManager:
Collaboration diagram for SaveManager:

Public Types

enum  DataType { Level , Game , PlayerPref }

Public Member Functions

void NewGame ()
void NewConfigs ()
void NewLevels ()
void LoadGame ()
 Load data that was serialized.
void LoadLevel (Level level)
 Update the values in the associated level struct.
int LoadIntData (string key)
 Loads int PlayerPref values by their key name.
float LoadFloatData (string key)
 Loads float PlayerPref values by their key name.
string LoadStringData (string key)
 Loads string PlayerPref values by their key name.
void SaveGame ()
 Save data that needs to be serialized.
void SaveLevel (Level level)
 Save level data.
void SaveConfigData (string key, int value)
 Save PlayerPref values that are ints.
void SaveConfigData (string key, float value)
 Save PlayerPref values that are floats.
void SaveConfigData (string key, string value)
 Save PlayerPref values that are strings.

Data Fields

bool hasLoaded
int objectsWithDataOpened = 0

Properties

static SaveManager Instance [get]
GameData gameData [get]
ConfigData configData [get]
LevelData levelData [get]

Events

static Action StartSavingEvent

Detailed Description

Singleton class to be called for saving and loading.

Member Enumeration Documentation

◆ DataType

Enumerator
Level 
Game 
PlayerPref 

Member Function Documentation

◆ LoadFloatData()

float SaveManager.LoadFloatData ( string key)
inline

Loads float PlayerPref values by their key name.

Parameters
key
Returns
Float value that is in PlayerPrefs
Here is the call graph for this function:

◆ LoadGame()

void SaveManager.LoadGame ( )
inline

Load data that was serialized.

Here is the call graph for this function:

◆ LoadIntData()

int SaveManager.LoadIntData ( string key)
inline

Loads int PlayerPref values by their key name.

Parameters
key
Returns
Int value that is in PlayerPrefs
Here is the call graph for this function:

◆ LoadLevel()

void SaveManager.LoadLevel ( Level level)
inline

Update the values in the associated level struct.

Parameters
level
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadStringData()

string SaveManager.LoadStringData ( string key)
inline

Loads string PlayerPref values by their key name.

Parameters
key
Returns
String value that is in PlayerPrefs
Here is the call graph for this function:

◆ NewConfigs()

void SaveManager.NewConfigs ( )
inline
Here is the caller graph for this function:

◆ NewGame()

void SaveManager.NewGame ( )
inline
Here is the caller graph for this function:

◆ NewLevels()

void SaveManager.NewLevels ( )
inline
Here is the caller graph for this function:

◆ SaveConfigData() [1/3]

void SaveManager.SaveConfigData ( string key,
float value )
inline

Save PlayerPref values that are floats.

Parameters
key
value
Here is the call graph for this function:

◆ SaveConfigData() [2/3]

void SaveManager.SaveConfigData ( string key,
int value )
inline

Save PlayerPref values that are ints.

Parameters
key
value
Here is the call graph for this function:

◆ SaveConfigData() [3/3]

void SaveManager.SaveConfigData ( string key,
string value )
inline

Save PlayerPref values that are strings.

Parameters
key
value
Here is the call graph for this function:

◆ SaveGame()

void SaveManager.SaveGame ( )
inline

Save data that needs to be serialized.

◆ SaveLevel()

void SaveManager.SaveLevel ( Level level)
inline

Save level data.

Parameters
levelThe level struct that stores the information that needs to be saved.
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ hasLoaded

bool SaveManager.hasLoaded

◆ objectsWithDataOpened

int SaveManager.objectsWithDataOpened = 0

Property Documentation

◆ configData

ConfigData SaveManager.configData
get

◆ gameData

GameData SaveManager.gameData
get

◆ Instance

SaveManager SaveManager.Instance
staticget

◆ levelData

LevelData SaveManager.levelData
get

Event Documentation

◆ StartSavingEvent

Action SaveManager.StartSavingEvent
static

The documentation for this class was generated from the following file: