Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

Is it possible to save functions useing playerPrefs?

$
0
0
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?

Viewing all articles
Browse latest Browse all 1333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>