Adventure Creator  1.68.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.SaveFileHandler_SystemFile Class Reference
Inheritance diagram for AC.SaveFileHandler_SystemFile:
AC.iSaveFileHandler

Public Member Functions

string GetDefaultSaveLabel (int saveID)
 Returns the default label of a save file. This is not the same as the filename - it is what's displayed in SavesList menus More...
 
void DeleteAll (int profileID)
 Deletes all save files associated with a given profile More...
 
bool Delete (SaveFile saveFile)
 Deletes a single save file More...
 
void Save (SaveFile saveFile, string dataToSave)
 Requests that game data be saved to disk. When saving is complete, it needs to confirm the output to SaveSystem.OnCompleteSave for the save to be recorded. More...
 
void Load (SaveFile saveFile, bool doLog)
 Requests that save game data be loaded from disk. When loading is complete, it needs to be sent back to SaveSystem.ReceiveLoadedData for it to actually be processed. More...
 
void Import (SaveFile saveFile, bool doLog)
 Requests that save game data from another game be loaded from disk (to be imported). When loading is complete, it needs to be sent back to SaveSystem.ReceiveImportedData for it to actually be processed. More...
 
List< SaveFileGatherSaveFiles (int profileID)
 Reads the disk for all save files associated with a given profile More...
 
List< SaveFileGatherImportFiles (int profileID, int boolID, string separateProjectName, string separateFilePrefix)
 Reads the disk for all save files associated with a given profile from another game, to allow for the importing of data between games More...
 
void SaveScreenshot (SaveFile saveFile)
 Saves a screenshot associated with a save file More...
 

Member Function Documentation

◆ Delete()

bool AC.SaveFileHandler_SystemFile.Delete ( SaveFile  saveFile)

Deletes a single save file

Parameters
saveFileThe SaveFile container which stores information about the save to delete
Returns
True if the deletion was succesful

Implements AC.iSaveFileHandler.

◆ DeleteAll()

void AC.SaveFileHandler_SystemFile.DeleteAll ( int  profileID)

Deletes all save files associated with a given profile

Parameters
profileIDThe ID number of the profile to delete saves for, or 0 if profiles are not enabled.

Implements AC.iSaveFileHandler.

◆ GatherImportFiles()

List<SaveFile> AC.SaveFileHandler_SystemFile.GatherImportFiles ( int  profileID,
int  boolID,
string  separateProductName,
string  separateFilePrefix 
)

Reads the disk for all save files associated with a given profile from another game, to allow for the importing of data between games

Parameters
profileIDThe ID number of the profile to search save files for, or 0 if profiles are not enabled
boolIDThe ID number of the Global Boolean variable that must be true in the file's data in order for it to be included, or -1 if this feature is not used
separateProductNameThe 'Product name' of the Unity product to import files from
separateFilePrefixThe 'Save filename' field of the AC project to import files from, as set in the Settings Manager
Returns
A List of SaveFile instances, with each instance storing information about each found save file

Implements AC.iSaveFileHandler.

◆ GatherSaveFiles()

List<SaveFile> AC.SaveFileHandler_SystemFile.GatherSaveFiles ( int  profileID)

Reads the disk for all save files associated with a given profile

Parameters
profileIDThe ID number of the profile to search save files for, or 0 if profiles are not enabled
Returns
A List of SaveFile instances, with each instance storing information about each found save file

Implements AC.iSaveFileHandler.

◆ GetDefaultSaveLabel()

string AC.SaveFileHandler_SystemFile.GetDefaultSaveLabel ( int  saveID)

Returns the default label of a save file. This is not the same as the filename - it is what's displayed in SavesList menus

Parameters
saveIDThe ID number of the save game
Returns
The save file's default label

Implements AC.iSaveFileHandler.

◆ Import()

void AC.SaveFileHandler_SystemFile.Import ( SaveFile  saveFile,
bool  doLog 
)

Requests that save game data from another game be loaded from disk (to be imported). When loading is complete, it needs to be sent back to SaveSystem.ReceiveImportedData for it to actually be processed.

Parameters
saveFileThe SaveFile container which stores information about the save to import
doLogIf True, a log should be shown in the Console once the data has been read

Implements AC.iSaveFileHandler.

◆ Load()

void AC.SaveFileHandler_SystemFile.Load ( SaveFile  saveFile,
bool  doLog 
)

Requests that save game data be loaded from disk. When loading is complete, it needs to be sent back to SaveSystem.ReceiveLoadedData for it to actually be processed.

Parameters
saveFileThe SaveFile container which stores information about the save to load
doLogIf True, a log should be shown in the Console once the data has been read

Implements AC.iSaveFileHandler.

◆ Save()

void AC.SaveFileHandler_SystemFile.Save ( SaveFile  saveFile,
string  dataToSave 
)

Requests that game data be saved to disk. When saving is complete, it needs to confirm the output to SaveSystem.OnCompleteSave for the save to be recorded.

Parameters
saveFileThe SaveFile container which stores information about the file. Note that only the saveID, profileID and label have been correctly assigned by this point
dataToSaveThe data to save, as a serialized string

Implements AC.iSaveFileHandler.

◆ SaveScreenshot()

void AC.SaveFileHandler_SystemFile.SaveScreenshot ( SaveFile  saveFile)

Saves a screenshot associated with a save file

Parameters
saveFileA data container for both the texture, and the associate save/profile IDs

Implements AC.iSaveFileHandler.