private void Start() { DontDestroyOnLoad(gameObject); if (playerInstance == null) { playerInstance = this; } else { Object.Destroy(gameObject); } }
public void StoreSaveData(string path) { if (CurrentSaveFile == null) { RequestMessageBoxError("Please open a file first."); return; } CurrentSaveFile.FileFormat = CurrentFileFormat; CurrentSaveFile.Save(path); StatusText = "File saved."; }