So I have some objects that are designed to create other objects when you destroy them. Like boxes you break open and there are items inside. Bombs that blow up and then spawn an explosion.
I thought everything was working fine, but now I see I have a problem when I try to change scenes, heck, even when I stop the play-in-editor I wind up spawning extra objects that then throw an error into the console.
So I’m wondering: is there a smarter way to go about this? How do I have objects that spawn things when they get destroyed, but not when they get destroyed because the scene is ending?