public void setRelocationTimer(Text tt) { float val = float.Parse(tt.text); PlayerPrefs.SetFloat("TimeForRelocation", val); gph.setTimeForRelocation(val); placeholderRelocationTimer.text = "" + val; }
void Start() { string ver = Application.version; if (PlayerPrefs.HasKey("bver")) { if (!(PlayerPrefs.GetString("bver").Equals(ver))) { UnityWebRequest.ClearCookieCache(); Caching.ClearCache(); PlayerPrefs.DeleteAll(); PlayerPrefs.SetString("bver", ver); } } else { UnityWebRequest.ClearCookieCache(); Caching.ClearCache(); PlayerPrefs.DeleteAll(); PlayerPrefs.SetString("bver", ver); } Debug.Log("Version " + Application.version + " bver " + ver); gph = GetComponent <GetPlaceHoldersDev>(); stickerInfoForPanel = null; stickerDeActivate = null; gloc = 0; bloc = 0; if (PlayerPrefs.HasKey("TimeForRelocation")) { float val = PlayerPrefs.GetFloat("TimeForRelocation"); gph.setTimeForRelocation(val); placeholderRelocationTimer.text = "" + val; } else { PlayerPrefs.SetFloat("TimeForRelocation", gph.timeForRelocation); } aRcamera = Camera.main.gameObject; }
public void setRelocationTimer(Text tt) { placeholderRelocationTimer.text = "" + PlayerPrefs.GetFloat("TimeForRelocation"); gph.setTimeForRelocation(float.Parse(tt.text)); PlayerPrefs.SetFloat("TimeForRelocation", float.Parse(tt.text)); }