Hi all, I wanted the game to wait for 3 seconds after our Player gameobject is destroyed, then execute the code to load the ending scene level.
This is what I did.
1st: Declare and initialize a boolean variable.
2nd: Change the value of variable when player gameobject is destroyed.
3rd: Check for the variable’s condition in Update() and use the StartCoroutine function.
However the game doesn’t even load the next scene or logs out the sentence:
“Player lost is true”.