When player dies I want to reset the game.
I do this: reset variables, reset persisted objects.
But immediately after that the game is janky: random layers are visible or invisible, and not according to their initial settings. This makes me wonder what else is not being reset.
What other actions can I do to ensure everything in the game is back to it's original state?