Objects in my game keep randomly destroying themselves when I don’t want them to. I’ve commented out the only instance of Object.Destroy in all my game scripts, and it still happens.
So far I’ve been unable to find any conditions that make an object more likely to destroy itself.
So, does anything besides Object.Destroy destroy an object, something I’m missing when looking for the cause of this bug?
Further information:
- Unity version 4.0.1f2.
- All objects destroyed are instantiated.
- The game involved gravitational physics. It’s possible, but unlikely, that I’ve made an error in calculations and set an object’s position to NaN or infinity.
- The game involves up to 1000 Shuriken particles, and gravity physics on those particles.
- Particles are almost always present when an object destroys itself, though this could be a coincidence.