DateTime daily bonus script works in editor but doesn't in build

Hi,
I want to build a simple daily bonus system. It’s the first scene when you launch the game. It is also the only script in the scene. I store DateTime as a string, after i convert it toBinary(I’ve seen this approach on the forums). The problem is that it works fine in editor(panel shows once per day), when I build it to my phone it shows there every time the scene is active. UI texts which I use to print out the possible prizes are stuck on ‘New Text’. Because I print out the text very early in the code I suspect the bug is above where I extract the date from memory.
Thanks for help :slight_smile:
public GameObject panel;
public Image imageArray;
public GameObject panel;
int bonuslvl;
public int prizeArray;
public Text textArray;
// Use this for initialization
void Awake()
{
long lastAccess;
DateTime lastAccessDate;

		if (PlayerPrefs.HasKey("lastrundate"))
		{
			lastAccess = Convert.ToInt64(PlayerPrefs.GetString("lastrundate"));
			lastAccessDate = DateTime.FromBinary(poslednjipristup);
		}
		else
			lastAccessDate = new DateTime(0);
		for (int i = 0; i < 5; i++)
			textArray_.text = prizeArray*.ToString();*_

* if (PlayerPrefs.GetInt(“firstrun”) == 0)//don-t want to show the ad first time user launches the game*
* {*
* panel.SetActive(false);*
* PlayerPrefs.SetInt(“firstrun”, 1);*
* }*
* else if(lastAccessDate.Day == DateTime.Now.Day)*
* {*
* panel.SetActive(false);*
* }*
* else*
* {*

* if ((DateTime.Now - lastAccessDate).TotalDays < 2)*
* {*
* bonuslvl = PlayerPrefs.GetInt(“bonuslvl”);*
* if(bonuslvl < 4)*
* bonuslvl++;*

* }*
* else*
* bonuslvl = 0;*
* PlayerPrefs.SetInt(“bonuslvl”, bonuslvl);*

* }*
* PlayerPrefs.SetString(“lastrundate”, DateTime.Now.ToBinary().ToString());*
* for (int i = 0; i <= bonuslvl; i++)*
_ imageArray*.color= new Color(0.5f, 0.5f, 0.5f);*_

please try to change your .net api compatibility level from .net 2.0 subset to .net 2.0