Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
string | GetSaveMethod () |
Gets the name of the file format. More... | |
string | GetSaveExtension () |
Gets the extension of files that are saved in this format. More... | |
string | SerializeObject< T > (object dataObject) |
Converts a serializeable object to a data string that can be saved to disk. More... | |
T | DeserializeObject< T > (string dataString) |
Converts a data string to an object that it represents More... | |
string | SerializeAllRoomData (List< SingleLevelData > dataObjects) |
Converts all scene data, as a List of SingleLevelData isntances, to a single string More... | |
List< SingleLevelData > | DeserializeAllRoomData (string dataString) |
Converts a data string to a List of SingleLevelData instances More... | |
T | LoadScriptData< T > (string dataString) |
Converts a data string to a subclass of RememberData More... | |
An interface for classes that handle the conversion of data to saveable strings and vice-versa. These classes do not handle the disk-handling, only the conversion of data.
To override the format of save files, create a new class that implements iFileFormatHandler, 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.
List<SingleLevelData> AC.iFileFormatHandler.DeserializeAllRoomData | ( | string | dataString | ) |
Converts a data string to a List of SingleLevelData instances
dataString | The List of SingleLevelData, represented as a serialized string |
Implemented in AC.FileFormatHandler_Json, AC.FileFormatHandler_Xml, and AC.FileFormatHandler_Binary.
T AC.iFileFormatHandler.DeserializeObject< T > | ( | string | dataString | ) |
Converts a data string to an object that it represents
dataString | The object represented as a serialized string |
Implemented in AC.FileFormatHandler_Binary, AC.FileFormatHandler_Xml, and AC.FileFormatHandler_Json.
string AC.iFileFormatHandler.GetSaveExtension | ( | ) |
Gets the extension of files that are saved in this format.
Implemented in AC.FileFormatHandler_Binary, AC.FileFormatHandler_Json, and AC.FileFormatHandler_Xml.
string AC.iFileFormatHandler.GetSaveMethod | ( | ) |
Gets the name of the file format.
Implemented in AC.FileFormatHandler_Binary, AC.FileFormatHandler_Json, and AC.FileFormatHandler_Xml.
T AC.iFileFormatHandler.LoadScriptData< T > | ( | string | dataString | ) |
Converts a data string to a subclass of RememberData
dataString | The RememberData subclass, represented as a serialized string |
Implemented in AC.FileFormatHandler_Json, AC.FileFormatHandler_Xml, and AC.FileFormatHandler_Binary.
T | : | RememberData |
string AC.iFileFormatHandler.SerializeAllRoomData | ( | List< SingleLevelData > | dataObjects | ) |
Converts all scene data, as a List of SingleLevelData isntances, to a single string
dataObjects | The scene data to serialize |
Implemented in AC.FileFormatHandler_Json, AC.FileFormatHandler_Xml, and AC.FileFormatHandler_Binary.
string AC.iFileFormatHandler.SerializeObject< T > | ( | object | dataObject | ) |
Converts a serializeable object to a data string that can be saved to disk.
dataObject | The object to convert |
Implemented in AC.FileFormatHandler_Binary, AC.FileFormatHandler_Json, and AC.FileFormatHandler_Xml.