private void Start()
 {
     DontDestroyOnLoad(gameObject);
     if (playerInstance == null)
     {
         playerInstance = this;
     }
     else
     {
         Object.Destroy(gameObject);
     }
 }
Exemple #2
0
        public void StoreSaveData(string path)
        {
            if (CurrentSaveFile == null)
            {
                RequestMessageBoxError("Please open a file first.");
                return;
            }

            CurrentSaveFile.FileFormat = CurrentFileFormat;
            CurrentSaveFile.Save(path);
            StatusText = "File saved.";
        }