Noob beginner question: how do you get a file?
Posted: Tue Jan 19, 2021 4:49 pm
Hi everybody,
Sorry for the noob question, but I haven't been able to find in the documentation how to get an es3 file from the directory. Basically what I want to do is to delete/clear a specific file that was created in a previous session. Something like:
In the documentation I found the method GetFiles, but that seems to return an array of strings. How can I get the file itself?
Any insight would be super helpful.
Thanks!
Sorry for the noob question, but I haven't been able to find in the documentation how to get an es3 file from the directory. Basically what I want to do is to delete/clear a specific file that was created in a previous session. Something like:
Code: Select all
public void ClearData(int _saveSlot)
{
if (ES3.FileExists($"{_saveSlot}_save.es3") )
{
ES3File _temp = ES3.GetFile($"{_saveSlot}_save.es3");
_temp.Clear();
} else
{
Debug.LogWarning($"There was not save file for save slot {_saveSlot}");
}
}
Any insight would be super helpful.
Thanks!