// Start is called before the first frame update void Awake() { if (i == null) { i = this; } }
public void GetReward() //use this for onclick button { LastChestOpen = (ulong)DateTime.Now.Ticks; PlayerPrefs.SetString("LastChestOpen", LastChestOpen.ToString()); chestButton.interactable = false; //give reward to user here //example i added coin CurrentCoin.AddCoin(5); }