Пример #1
0
    // open the delete files panel for the dataPath specified
    public void ShowDeletePanel()
    {
        ContinuousSaveController.continuousSaveActive = false;
        deletePanel.SetActive(true);
        DeleteFileCenterSnap deletecentersnap = FindObjectOfType <DeleteFileCenterSnap>();

        deletecentersnap.StartRepopulate(dataPath);
        savePanelGO.SetActive(false);
        DestroySaveList();
    }
Пример #2
0
    // delete the selected file called from deleteconfirmationpanel OK button.
    public void DeleteFile()
    {
        ContinuousSaveController.continuousSaveActive = false;
        FileInfo fi = new System.IO.FileInfo(dataPath + "/" + deleteName + ".dat");

        UnityEngine.Debug.Log(fi);
        if (fi.Exists)
        {
            fi.Delete();
            fi.Refresh();
            while (fi.Exists)
            {
                System.Threading.Thread.Sleep(100);
                fi.Refresh();
            }
        }
        DeleteFileCenterSnap deletecentersnap = FindObjectOfType <DeleteFileCenterSnap>();

        deletecentersnap.StartRepopulate(dataPath);
        deleteConfirmPanel.SetActive(false);
    }