/// <summary> /// Submit and save all the info for later use /// </summary> public void SubmitInfo() { User myUser = new User() { Name = FormTexts[0].text, Age = int.Parse(FormTexts[1].text), Gender = FormTexts[2].text, Star = FormTexts[3].text, DeviceID = SystemInfo.deviceUniqueIdentifier }; print(myUser.DeviceID + myUser.Name); print(myUser.Name); print(myUser.Gender); string path = Path.Combine(Application.persistentDataPath, "UserInfo.json"); JSONManager.SerializeData(myUser, path); FormPanel.SetActive(false); PlayerPrefs.SetString("name", myUser.Name); PlayerPrefs.Save(); UserInfoCollected?.Invoke(myUser); }