public void OnApplicationQuit() { PlayerPrefs.SetString("AncientTime", System.DateTime.Now.ToString()); for (int i = 0; i < nbGuard; i++) { string g = "guard" + i.ToString(); PlayerPrefs.SetInt(g, guardActive [i]); } PlayerPrefs.SetInt("LifeGuard", Mathf.Abs(gm.GetLifeGuard() - gm.GetBaseLife())); PlayerPrefs.SetFloat("VolumeMusic", sm.GetVolume(0)); PlayerPrefs.SetFloat("VolumeEffect", sm.GetVolume(1)); PlayerPrefs.SetInt("LastScore", GetComponent <ScoreManager>().GetScore()); }