- Home /
Question by
lht94 · Aug 08, 2017 at 04:34 AM ·
objectdestroyorderdestruction
How to set Object destruction order at game over
I have MainSystem (DontDestoryonLoad Singleton Object) that has IngameManger I want that Object destruction lastly at game over
so How to set Object destruction order at game over?
script order may be not solution.. thank you for reading
Comment
Use your imagination?
if (gameover)
Destroy(this);
thank you for your reply but I mean game over is Application Quit (Unity Editor game play quit)
$$anonymous$$ake a variable that sets a static bool to true
public static bool GameOver = false;
then somewhere in update you do
if (GameOver) {
// destroy the object
// then do application quit
}
Your answer
Follow this Question
Related Questions
how to predefine an order to destroy objects 0 Answers
Destroy object using mouse click(raycast to detect collision) 2 Answers
Destroy an enemy when it touches an object 2 Answers
Destroy Object during animation 2 Answers
Destroy() not working 0 Answers