Hey everyone, so I am storing Integers in the PlayerPref, but I want the PlayerPref to reset when I start the game. The reason I can’t use void Awake or void Start is because these will trigger when it transitions to a new scene. Is there a function that only triggers when you originally start the game?
Thanks!
There might be if you check the documentation… But you could use start and use a bool for if if has triggered already.
You could try checking if Time.time is lower then like 2 sec, or check what scene you are in. If you are in the main menu it could reset.
You can use OnEnable. It is called whenever an object is enabled.
Similarly, OnDisable is called when the object is disabled.