I’m having some doubt with DontDestroyOnLoad() :-
We first use an if statement to check weather their are more than one gameStatus gameobject or not in Level-2 and if their are, then we write Destroy(gameobject)
to destroy the extra one…However this same script is on the gameStatus gameobject of Level-1(which came to Level-2 by DontDestroyOnLoad()) and and that of Level-2, so why dosen’t both of them gets destroyed??
[ Sorry if I write something dumb, Simpleton is not that simple for me ]
Also why do we need to write this whole code in Awake()
, why not in Start()
??