- Home /
Question by
parachutingpotatochips · Apr 09, 2020 at 08:49 PM ·
startfunctions
Function when you start the game.
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!
Comment
Best Answer
Answer by $$anonymous$$ · Apr 10, 2020 at 01:16 PM
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.
Answer by logicandchaos · Apr 10, 2020 at 12:33 AM
There might be if you check the documentation.. But you could use start and use a bool for if if has triggered already.
Your answer