I was editing scripts in the iPhone editor today, and it crashed when I hit save, and has crashed every time I try to run it since.
I’m pretty sure it’s a script breaking it, and usually after about 3 restarts unity will stop importing a script that breaks it, but not this time. It just crashes and crashes.
I’ve been making a horrible mess of my code commenting things out trying to determine what the problem is. Does anyone know how I might figure out what the problem is without further wrecking my code?
Thanks
Back up your game.
Delete the first half of your scripts. Is it fixed? If no, try deleting the other half.
When you know which half it’s in, Delete half of that half, and so on, until you get to the script. Then, debug.
Or … list all the script files in last-updated order and rename (*.keepers) the most recently updated until you get it.
Thanks… I did something like that and finally found it. It was a bear because the crash was dependent on other things compiling, so when the compiler stopped because of missing scripts, no crash.
I had to block comment savagely until I found it.
"block comment savagely"
Had me laughing on that one.
I get this behaviour when I’m running scripts in @ExecuteInEditMode() and having it read external functions that just doesn’t exist yet. I learned my lesson big time 