Static variable resetting when it shouldn't!
Hi! I have a problem with just one of my static variables and I have no idea why. It was working correctly just a day ago and now it isn't.
A certain trigger is supposed to give the player one point, wait 3 seconds and re-load the level. Another trigger is supposed to give the player three points and also re-load after 3 seconds. The total score carries on until a certain number of attempts, then I reset it manually to 0. The former is working perfectly, but the latter is resetting when the level is re-loaded! Thus giving no points to the player.
Any idea why this could be happening all of a sudden?
Edit: I remembered that if I just load the scene directly, it works fine. But if I access the level through the Main Menu, that's when it fails.
Your answer
Follow this Question
Related Questions
Does reading/changing Static variables constantly affect Performance or get Garbage Collected? 1 Answer
Universal Stats Class for game character/objects 0 Answers
Object reference not set to an instance of an object 0 Answers
Change value of a static variable multiple times in one script 2 Answers
Singleton GameManager with DontDestroyOnLoad acting weird 0 Answers