Hi, I am trying to make a clicker game, which means that i need numbers to increase while I am using/while I am in another scene. From what I have learned PlayerPrefs is the way to do this. So I have tried to use Playerprefs to save the info I get from this in my script:
public int getFoodPerSec()
{
int tick = 0;
foreach (itemManager item in items)
{
tick += item.count * item.tickValue;
}
return tick;
When i try to save this with PlayerPrefs.setInt, i get an error.
Is there a better way to store this information? or am I doing it wrong?
↧