Пример #1
0
    public DevSettingsData SavePlayerSettings()
    {
        DevSettingsData psd = new DevSettingsData();

        psd.resetPersistentData = resetPersistantData;
        psd.saveOnQuit          = saveOnQuit;

        return(psd);
    }
Пример #2
0
    public void SaveDev()
    {
        DevSettingsData devSettingsData = new DevSettingsData();

        devSettingsData.resetPersistentData = resetPersistantData;
        devSettingsData.saveOnQuit          = saveOnQuit;

        BinaryFormatter bf   = new BinaryFormatter();
        FileStream      file = File.Open(Application.persistentDataPath + "/devData.dat", FileMode.Create);

        Debug.Log("Saved dev data to: " + Application.persistentDataPath + "/devData.dat");
        bf.Serialize(file, devSettingsData);
        file.Close();
    }
Пример #3
0
 public void LoadPlayerSettings(DevSettingsData psd)
 {
     resetPersistantData = psd.resetPersistentData;
     saveOnQuit          = psd.saveOnQuit;
 }