- Home /
What Calls Upon The Game Stopping?
Okay so this is really getting on my nerves. When I hit stop on my game it takes 10-20 minutes to actually stop, making it impossible to test scripts.
I have NO OnDestroy(), OnApplicationQuit, or any similar functions that run upon stopping, what all functions are called when you stop the game or quit the application?
P.S. it also does this when exiting the game in the build.
Okay now this is the part that is really confusing, I have a scene that is a loading screen to load the main scene, and of course the main scene.
If I just have the main scene opened and then I click stop, it freezes. But if I load the loading scene and then let it load until I'm on the main scene, it doesn't freeze.
So it is the scene but it isn't? I'm very confused.
Please help ASAP because this is slowing development down to where I only add 1-2 features a day, as apposed to 4-6 a day before. (Small features, only big ones once every 5-6 days, now never)
Thanks in advance.
Not sure if any of this will answer or help, but I can say your entire scene is destroyed, and then the previous state is deserialized and restored, so a scene of considerable complexity may take some time to destroy and deserialize.
Also, check to see if your serialized classes have two-way references or self references in serialized fields; these cause a hit to performance during deserialization and might be building up causing a delay (see here for info)
Once that's checked out, I might advise going to project settings: editor, and setting the sprite packer to build only if you find that starting the scene takes too long due to UI and 2D elements,
I would suggest trying to download one older, or one newer version of Unity and see if it helps the problem. I would bet is probably some sort of internal unity bug.
Just as a side note, how are you doing on hard drive space? Transitioning scenes in Editor is basically a lot of serialization work (basically you need to remember the whole editor state before you enter play mode, and then restore it afterwards). If you're actually cramped on HDD space it could be the reason.
Answer by Zen_Hap · Jun 02, 2016 at 08:30 AM
I'm sorry to say this, but I think your computer just can't handle Unity. What computer do you have because if you have 1 GB of ram or 2, you need at least 3 to run Unity and if you have a 1, 2, or 3ghz processor you need around 4ghz, though 3ghz wouldn't take 10-20 mins to stop, it would take around 20 seconds.
I hope I helped!
(P.S: I have made an early release of my game that is not quite finished on gamejolt.com called Buzzle. here is the link:) http://gamejolt.com/games/buzzle/138631
Your response is immensely uneducated. Processor clock speeds have apsolutely nothing to do with their relative performance. Your RA$$anonymous$$ estimation is also completely off because I used to develop one of my projects on an 8 year old laptop with only 2GB of DDR2 and it worked normally.
The core of the OP's problem is obviously a bug within his particular Unity version, resolved by either downloading older or newer version and see if it helps the problem.
And your PS shameless game plug has nothing to do with the question.
Thank you, Eudaimonium.
$$anonymous$$y PC isn't great but I certainly don't have 1GB of RA$$anonymous$$ and this just now randomly started, it has nothing to do with my PC as I've mentioned before.