void IntTests() { FileBasedPrefs.SetInt("test", 1); if (!FileBasedPrefs.GetInt("test").Equals(1)) { Debug.LogException(new System.Exception("SetIntFailed")); return; } FileBasedPrefs.SetInt("test", 2); if (!FileBasedPrefs.GetInt("test").Equals(2)) { Debug.LogException(new System.Exception("ReplaceIntFailed")); return; } if (!FileBasedPrefs.HasKeyForInt("test")) { Debug.LogException(new System.Exception("HasKeyForIntFailed")); return; } FileBasedPrefs.DeleteInt("test"); if (!FileBasedPrefs.GetInt("test").Equals(0)) { Debug.LogException(new System.Exception("DeleteIntFailed")); return; } FileBasedPrefs.SetInt("test", 333); if (!FileBasedPrefs.GetInt("test").Equals(333)) { Debug.LogException(new System.Exception("ReplaceIntFailed")); return; } Debug.Log("Int Tests Passed"); }