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

PlayerPrefs.GetInt won't load when awake.

$
0
0
I have a strange problem where my PlayerPrefs.SetInt works and saves just fine, But when i try to load it with void awake or start, the value stays at 0 until something is added to it. For example: If i have collected 20 items in my game and then reload the game, The item counter is 0 until i pick up another item and then it displays 21, despite the preference being loaded on awake/start. If you guys have any idea of what's happening please let me know.

Viewing all articles
Browse latest Browse all 1333

Trending Articles



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