- Home /
Unity crashes immediatly when playing a scene
Yesterday Unity suddenly acted weird when it was in play mode: I couldn't get out of play mode, nor could I select anything in the project hierarchie, I could however still move the camera in the scene view. I loaded a different scene, which did make Unity go out of play mode, but since then Unity completely crashes (almost) each time I try to play a scene.
Any idea why this happens and how to fix?
my collegues think it might be a caching issue, and suggest to clear the cache, how do I do this properly? (because I don't want to have to reimport the entire project, that takes hours)
"Have you tried turning it off and on again?" Try restarting Unity, then restarting your computer. Usually contacting Support is better for problems with the Editor :)
@Steven Which part? Asking Unity Support or restarting everything?
restarting my computer, not contacting support.
But the problem suddenly dissapeared a while ago. I wouldn't call this problem solved, but it works for now :s If I have any trouble again, I guess I'll ask support, though I don't have any good experience with that (they rarely answer)
I would like to add to this, since you mentioned caching and since you are (rightfully so) afraid of it happening again:
If you aren't already doing so, work with meta files enabled and with proper source control. This will give you two clear abilities:
Roll back to a non crashing version, and
You can easily delete Unity's data folder (/Library), and Unity will rebuild it from the meta files.
( more on version control and Unity in this answer )
Answer by vinod.kapoor · Jul 16, 2013 at 12:26 PM
what i think is there must be some loop in your Code which is not able to find its exit point. this loop continues to execute and that makes the game to crash. In my case I have faced this problem in case of loop.
Your answer
![](https://koobas.hobune.stream/wayback/20220613104839im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
why cant i play my scene? 2 Answers
one project crashing after second play press 0 Answers
Webplayer hangs on loading scene 2 Answers
Why Unity crashes and how can I fix it? 0 Answers
When my car crashes into the guards, the game is supposed to be over! 0 Answers