- Home /
Editor crashes as soon as I load my game
Hi all, I'm having an incredibly frustrating problem right now. I was fixing some code in a game I was constructing, then, upon playing, the editor crashed. I sent a case via email and am still waiting on a response. Here's the kicker: There's no solution to the crash, and it happens every time I try to start my game. I've shut down my computer and turned it back on. I've tried removing the scripts I was working on. I've even duplicated the file and opened it with the editor, but I keep getting the same crash message. The only time I've gotten the game to work was after I had removed all of the scripts from the folder, then began to put some back in. Upon putting all of them in, however, the editor crashes again. Does anyone have a fraction of a clue what's going on here? I don't have a previous version of this game saved on the cloud either. Thanks in advance.
You obviously have script inside unity that has infinite loop. that would be my guess,... dont know how many scripts you have but get rid of them all from your project ,add those you know were working before and then keep adding scripts one by one back. althouh its probably the last one or two scripts you worked on.J p.s. you could have left some scripts sitting on object in inspector. p.p.s by "althouh its probably the last one or two scripts you worked on" i dont necessarily mean the 2 newest, you could make changes to a old script trying to put some new funcionality in. one more thing you could try is, open the folder with all your project codes in windows and sort them by date of change (or what you call it in english)
I wouldn't say it's "obviously" an infinite loop (I get the impression this is an instant crash).
In any case the obvious question for me would be.. is there anything in the editor log? That has to be the first port of call for something like this.
And two bits of more general advice:
1) use source control. In the unlikely event that the editor log doesn't help You would be able to roll back to a version that was ok and that would make finding the problem much easier. Not using source control is, frankly, insane.
2) whenever there is something "inexplicable" happening it is worth forcing a reimport of everything by deleting your project's Library/Temp folders while Unity is closed.
But I should stress again that you should do nothing at all until you've looked at the editor log.
Answer by EternalClickbait · May 13, 2019 at 10:29 AM
It has been happening to me too. For me it was Newtonsoft json serializer that was the problem. Try adding the scripts back in one by one to find the problem. It's almost certainly an external file that's causing it
Your answer
Follow this Question
Related Questions
Unity Crashes on startup 19 Answers
Unity crashes in mac on launch when w/o admin privilege 0 Answers
Can't launch Unity 3.3.0f4 on Mac 10.6.6! 0 Answers
Editor Crash on Launch. 0 Answers
Unity 3d crashes on launch. 2 Answers