What can cause Unity to crash?

I recently made some changes in my ammo drop script. Now, if I run the game with enemies enabled, it freezes up. If I deactivate my spawning system, it runs fine. I’m fairly certain that is has something to do with my ammo drop script, but I don’t know what it is. What in a script can cause Unity to crash?


in all seriousness- you probably have a recursive loop running. I’d just go through all of your suspect scripts and look at EVERY loop and make sure that they can logically end at some point. Also make use of breakpoints and debugging… should be pretty easy to narrow it down with some traditional sleuthing.

Unity HATES endless loops…

If you try importing assets inside a project which is on a network drive, you will get an error code saying “fatal error database locked” and you will need to quit unity.