private void SaveData() { DoPlayerPrefs.SetBool("OpenMussic", m_OpenMusic); DoPlayerPrefs.SetBool("OpenSound", m_OpenSound); DoPlayerPrefs.SetBool("IsGuest", m_isGuest); DoPlayerPrefs.SetString("UniqueIdentifier", m_UniqueIdentifier); DoPlayerPrefs.SetInt("AntiAddictionSeconds", m_AntiAddictionSeconds); DoPlayerPrefs.SetInt("AntiAddictionTimeStamp", m_AntiAddictionTimeStamp); DoPlayerPrefs.SetInt("QuestionsCompletedTotal", m_QuestionsCompletedTotal); }
private void ReadData() { m_OpenMusic = DoPlayerPrefs.GetBool("OpenMussic", true); m_OpenSound = DoPlayerPrefs.GetBool("OpenSound", true); m_isGuest = DoPlayerPrefs.GetBool("IsGuest", true); m_UniqueIdentifier = DoPlayerPrefs.GetString("UniqueIdentifier"); if (m_UniqueIdentifier == "") { m_UniqueIdentifier = SystemInfo.deviceUniqueIdentifier; DoPlayerPrefs.SetString("UniqueIdentifier", m_UniqueIdentifier); } m_AntiAddictionSeconds = DoPlayerPrefs.GetInt("AntiAddictionSeconds", 0); m_AntiAddictionTimeStamp = DoPlayerPrefs.GetInt("AntiAddictionTimeStamp", 0); m_QuestionsCompletedTotal = DoPlayerPrefs.GetInt("QuestionsCompletedTotal", 0); m_QuestionsCompletedThisTime = 0; }