|
Adventure Creator 1.85.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2025
|
Public Member Functions | |
| void | SaveOptions (int profileID, string dataString, bool showLog) |
| Saves the OptionsData, serialized as a string, to disk. | |
| string | LoadOptions (int profileID, bool showLog) |
| Loads the OptionsData, serialized as a string, from disk. | |
| void | DeleteOptions (int profileID) |
| Deletes the saved OptionsData string for a given profile. | |
| int | GetActiveProfile () |
| Returns the active profile ID number, if profiles are enabled. | |
| void | SetActiveProfile (int profileID) |
| Records the active profile ID. | |
| bool | DoesProfileExist (int profileID) |
| Checks if OptionsData for a given profile is stored. | |
An interface for classes that handle the saving and loading of OptionsData. This class only handles the reading and writing of the data to and from disk - the data is already serialized as a string, and does not need processing.
To override where options data is saved, create a new class that implements iOptionsFileHandler, and assign it with:
Where MyClassName is the name of your class.
To have this code run when the game begins, place it in the Awake function of a script in your game's first scene.
| void AC.iOptionsFileHandler.DeleteOptions | ( | int | profileID | ) |
Deletes the saved OptionsData string for a given profile.
| profileID | The ID number of the profile to delete</parm> |
Implemented in AC.OptionsFileHandler_PlayerPrefs, and AC.OptionsFileHandler_SystemFile.
| bool AC.iOptionsFileHandler.DoesProfileExist | ( | int | profileID | ) |
Checks if OptionsData for a given profile is stored.
| profileID | The ID number of the profile to check for</parm>
|
Implemented in AC.OptionsFileHandler_PlayerPrefs, and AC.OptionsFileHandler_SystemFile.
| int AC.iOptionsFileHandler.GetActiveProfile | ( | ) |
Returns the active profile ID number, if profiles are enabled.
Implemented in AC.OptionsFileHandler_PlayerPrefs, and AC.OptionsFileHandler_SystemFile.
| string AC.iOptionsFileHandler.LoadOptions | ( | int | profileID, |
| bool | showLog ) |
Loads the OptionsData, serialized as a string, from disk.
| profileID | The ID number of the profile to be loaded, or 0 if profiles are not enabled |
Implemented in AC.OptionsFileHandler_PlayerPrefs, and AC.OptionsFileHandler_SystemFile.
| void AC.iOptionsFileHandler.SaveOptions | ( | int | profileID, |
| string | dataString, | ||
| bool | showLog ) |
Saves the OptionsData, serialized as a string, to disk.
| profileID | The ID number of the profile to be saved, or 0 if profiles are not enabled |
| dataString | The serialized data to save |
| showLog | If True, a Console message upon succesful saving is requested |
Implemented in AC.OptionsFileHandler_PlayerPrefs, and AC.OptionsFileHandler_SystemFile.
| void AC.iOptionsFileHandler.SetActiveProfile | ( | int | profileID | ) |
Records the active profile ID.
| profileID | The ID number of the profile to set as active</parm> |
Implemented in AC.OptionsFileHandler_PlayerPrefs, and AC.OptionsFileHandler_SystemFile.