Edit:
I think I found a solution…
Using, PlayerPrefs.HasKey()…
//check if this value exists in player prefs...
if(PlayerPrefs.HasKey("somKey")){
//OK!
}
//ORIGNAL
Hi,
At Start() I am gathering the last time, in real time the game was played, it works fine if, I have played before, however, if I clear out all PlayerPrefs, saved data, and essentially, start from scratch, I get an error.
//the error occurs at the last line, print("3. "…
DateTime date = DateTime.Now;
print("1." + date);
//convertto binary
long date_bin = date.ToBinary();
print("2." + date_bin);
//getthebinarybackfromthesave data
long old_date_bin = long.Parse(PlayerPrefs.GetString("date"));
print("3." + old_date_bin);
I am trying to figure out how I can if, first time playing (or info is null for lack of a better term) move over this.