Game Status disappears upon clicking start

Hi guys, I’m new to C# and is currently facing a problem with Singleton Pattern- Below is the code for my GameStatus, which is almost a 1:1 replica of the one used in the lecture.


Here is the Game window before hitting Start

After

As you can see the GameStatus script disappears completely after the game started. Deleting the Awake code block solves the problem, but the score resets every level so that defeats the purpose of the lesson. Could you guys help me deal with this problem? Many thanks in advance.


SOLVED: I have actually added a GameStatus component to Score before this, thus there are two instances of GameStatus at Awake, one in Score under Canvas, and one standalone GameStatus. The code detected and destroyed both.

Privacy & Terms