Holds the data for a saved game.
More...
|
class | SaveRecord |
| Holds the data returned by a Saver along with the Saver's key and the index of the scene that the Saver was in. More...
|
|
|
void | OnBeforeSerialize () |
|
void | OnAfterDeserialize () |
|
SaveRecord | GetDataInfo (string key) |
| Retrieves info about the previously-saved data for a Saver.
|
|
string | GetData (string key) |
| Retrieves the previously-saved data for a Saver.
|
|
void | SetData (string key, int sceneIndex, string data) |
| Stores a Saver's data.
|
|
void | DeleteData (string key) |
| Removes a Saver's data.
|
|
void | DeleteObsoleteSaveData (int currentSceneIndex) |
| Removes all save records except those in the current scene and those that are configured to remember across scene changes.
|
|
|
int | version [get, set] |
| The save file format version.
|
|
string | sceneName [get, set] |
| The scene in which the game was saved.
|
|
Dictionary< string, SaveRecord > | Dict [get] |
| Provides direct access to the dictionary of save records.
|
|
Holds the data for a saved game.
◆ DeleteData()
void PixelCrushers.SavedGameData.DeleteData |
( |
string |
key | ) |
|
|
inline |
Removes a Saver's data.
- Parameters
-
◆ DeleteObsoleteSaveData()
void PixelCrushers.SavedGameData.DeleteObsoleteSaveData |
( |
int |
currentSceneIndex | ) |
|
|
inline |
Removes all save records except those in the current scene and those that are configured to remember across scene changes.
- Parameters
-
currentSceneIndex | Don't clear out Savers in this scene. |
◆ GetData()
string PixelCrushers.SavedGameData.GetData |
( |
string |
key | ) |
|
|
inline |
Retrieves the previously-saved data for a Saver.
- Parameters
-
- Returns
- Returns the data stored under the Saver's key, or null if no data is stored.
◆ GetDataInfo()
SaveRecord PixelCrushers.SavedGameData.GetDataInfo |
( |
string |
key | ) |
|
|
inline |
Retrieves info about the previously-saved data for a Saver.
- Parameters
-
- Returns
- Returns the Save Record stored under the Saver's key, or null if no data is stored.
◆ OnAfterDeserialize()
void PixelCrushers.SavedGameData.OnAfterDeserialize |
( |
| ) |
|
|
inline |
◆ OnBeforeSerialize()
void PixelCrushers.SavedGameData.OnBeforeSerialize |
( |
| ) |
|
|
inline |
◆ SetData()
void PixelCrushers.SavedGameData.SetData |
( |
string |
key, |
|
|
int |
sceneIndex, |
|
|
string |
data |
|
) |
| |
|
inline |
Stores a Saver's data.
- Parameters
-
key | Saver's unique key. |
sceneIndex | Scene in which Saver exists. |
data | Data to set. |
◆ Dict
Dictionary<string, SaveRecord> PixelCrushers.SavedGameData.Dict |
|
get |
Provides direct access to the dictionary of save records.
Use with caution.
◆ sceneName
string PixelCrushers.SavedGameData.sceneName |
|
getset |
The scene in which the game was saved.
◆ version
int PixelCrushers.SavedGameData.version |
|
getset |
The save file format version.
This is an arbitrary value that you can assign by setting SaveSystem.version.
The documentation for this class was generated from the following file:
- C:/Dev/Quest Machine/Dev/Source/Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/Misc/SavedGameData.cs