New answers tagged

0

I load the file in my player's creation event and it has solved my problem. :) Put this in your controller object create event: //Create save directory global.dir = working_directory+"/Saves/" I ran this code in the player create event: if (file_exists(global.dir + "Score.ini")) { ini_open(global.dir + "Score.ini"); ...


0

There are quite a few things to improve, but that is expected from a new programmer. These are the tips for future: you should not be calling PlayerPrefs every single Update call. It just hogs performance. ... you should not trust static variables on counting stuff. Better approach would be to use Singleton pattern (answer of AndresBarrera), and use its ...


0

You see exactly what your code describes. You are storing in your PlayersPref your total amount of coins. You load this value when you start a game, it would be weird if you would not see the total amount. When a game starts, you don't want to load from your PlayersPref but just 0. You might want to introduce a second variable to your CoinScoreManager (...


Top 50 recent answers are included