A bit of custom scripting would do it, which you could place in a custom Action.
When you overwrite an existing save, AC actually deletes the old file first - you can use the same code to do the job. Something like this should do it:
void DeleteSaveFile (string fullFileName) { FileInfo t = new FileInfo (fullFileName); if (t.Exists) { t.Delete (); } }
The function requires the filename as a parameter. To get the filename given a save ID (the slot number), try this:
Other Question. How I should set up a "reset Game " action ? That action should restart all game settings and put a player in the start poitn of the game ?
Comments
When you overwrite an existing save, AC actually deletes the old file first - you can use the same code to do the job. Something like this should do it:
void DeleteSaveFile (string fullFileName)
{
FileInfo t = new FileInfo (fullFileName);
if (t.Exists)
{
t.Delete ();
}
}
The function requires the filename as a parameter. To get the filename given a save ID (the slot number), try this:
private string GetSaveFileName (int saveID)
{
string fileName = "";
#if UNITY_WEBPLAYER || UNITY_WINRT
fileName = GetProjectName () + "_" + saveID.ToString ();
#else
fileName = saveDirectory + Path.DirectorySeparatorChar.ToString () + GetProjectName () + "_" + saveID.ToString () + saveExtention;
#endif
return (fileName);
}
So your Action could then run something like:
DeleteSaveFile (GetSaveFileName (0));
DeleteSaveFile (GetSaveFileName (1));
DeleteSaveFile (GetSaveFileName (2));
DeleteSaveFile (GetSaveFileName (3));
Other Question. How I should set up a "reset Game " action ? That action should restart all game settings and put a player in the start poitn of the game ?