- Home /
Unity 5 - Scene does not play!
My engine hangs when i press play on my scene! I don't know what I changed or did wrong but it hangs there, its been like that for 10 minutes already. None of the buttons work after i press play. it just stays in a state of scene load before play. IDK whats wrong can someone help?
Answer by WillNode · May 08, 2015 at 01:35 AM
it's maybe happen on your script, if your script has something like this :
void Start(){
while(true)
{
//It never endings!
}
}
it could be your problem, unity will never responding (even on task manager status it's stays running) and you can see it using CPU Usage very high (On Quad-Core it would be around 25)
Good point, if you have any kind of endless loops running, or even attempt to have any loops in the "Update" function, the same thing will happen, seems like Unity doesnt like running for or while loops every frame :P
Yep, from experience infinite loops are the most likely cause of Unity "hanging".
Thanks for the feedback, That was exactly the case. UE4 didnt like them either. Even if i put a delay it still does not like while loops.
Answer by Dibbie · May 08, 2015 at 12:29 AM
That happens to me sometimes. Open up your Task Manager when it does this, and see under "Applications" if the "Status" for Unity is "Not Responding", if so, it crashed, and you will need to relaunch it.
If it says running, then its just lagging, you could have a lot going on in your scene at a time, or, if nothing at all, it could be that your computer is slow or something.
If it happens pretty much all the time, then its a compatibility issue with your computer. Check your computer specs and compare them to the recommendations on Unity 5, and see if you match or better them. If so, then its a corruption thing, and all you can really do is re-install Unity 5, or transfer it to another computer and work from there (I did that with my laptop, never crashes on there, even though my PC is 3x better...)
Beyond that, I wouldnt know how to help. Hopefully one of those solutions work out for you.
thank you for the prompt Response. idk why it crashes when i try to play, it does show up as not responding each time with the specific scene. I am going to try it on a new computer later. $$anonymous$$y laptop surpasses all the mi$$anonymous$$um requirements of unity.
ghz i7 4500 series (overclock to 2.4) 8 gb Ram Nvidia Geforce 745m Graphics Card 1 tb HDD space.
Your answer
Follow this Question
Related Questions
Another animation is not working 0 Answers
movietexture imports as black screen 4 Answers
hi.how save all sounds in my scene? 1 Answer
Unity stops while I work with my project 0 Answers
Choppy Game Screen 3 Answers