Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Wolfrik_Creations · May 28, 2016 at 08:27 PM · unity5freezeplaymode

Unity Takes Forever to Exit Play Mode

This just started yesterday and the only thing I can think of that I changed was creating a GUI.Window and changing a model which threw a convex mesh collider error and I had to turn convex off.

Anyways when I play my game it takes the usual 10 seconds to load, but when I stop the play mode it takes 10-30 minutes to actually stop, it just freezes until it's done.

I might as well just close unity and reopen it, probably faster.

Thought I might need to mention that if I click pause it's fine, I can pause/unpause perfectly fine but no matter what if I click the stop button it pauses.

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · May 28, 2016 at 10:00 PM 0
Share

Have you added any OnDestroy(), OnApplicationQuit() hooks or similar?

avatar image Wolfrik_Creations tanoshimi · May 28, 2016 at 10:09 PM 0
Share

Nope. Don't have either of those.

avatar image ninja_gear · May 31, 2016 at 03:21 AM 0
Share

Also check OnDisable. Unity disables, and destroys every object in the heirarchy before calling ApplicationQuit

avatar image Wolfrik_Creations ninja_gear · May 31, 2016 at 03:26 AM 0
Share

Thank you for the reply, I ran a scan through all of my scripts again and it returned 0 instances.

The only exit type function I have is OnDisconnectedFromServer. I will check those ones.

Update: Just checked it and there are no differences from before this happened, there's only 1 instance of OnDisconnectedFromServer anyway.

avatar image Wolfrik_Creations · Jun 01, 2016 at 12:31 AM 0
Share

I don't know if this will help you guys or not, but today I went to debug multiplayer with my friends (luckily, for the first time ever, there were no mp-side bugs!), and I found that me and all of my friends' games took around 5-10 $$anonymous$$utes to quit as well.

$$anonymous$$eep in $$anonymous$$d that this is in the build now, not the editor.

This is slowing my development down quite a bit so if anybody figures it out for me then I would really really appreciate it! :)

avatar image Wolfrik_Creations Wolfrik_Creations · Jun 01, 2016 at 12:33 AM 0
Share

Also, I apologize if some of my messages have a few grammar/spelling mistakes, I have good grammar and spelling but I keep not paying attention while thinking of what to say.

avatar image ninja_gear Wolfrik_Creations · Jun 01, 2016 at 12:40 AM 0
Share

If you have a problem you cant solve just roll back to a previous version, and look for differences.

avatar image Wolfrik_Creations ninja_gear · Jun 01, 2016 at 12:44 AM 0
Share

I was gonna do that, but the last backup was about a month ago and I've made a crapload of progress since then.

It would probably take days if not weeks.

I guess I might have to try, though.

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by protopop · Feb 20, 2017 at 06:45 AM

My game was set to High Quality in the editor but Low on Play. So when I would exit play mode there was a long pause while it switched all the textures to the higher resolution. This was an accident and once i set it so play mode and the editor both used the same quality level the pause went away.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LilGames · Aug 22, 2019 at 04:12 PM 0
Share

How do you set two different settings??

avatar image
0

Answer by DroidifyDevs · May 28, 2016 at 10:13 PM

That's weird. Did you try making a new, blank project then try starting and exiting play mode in the new project? Need to see if this is an issue with your project, PC, Unity3D or all of those.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Wolfrik_Creations · May 28, 2016 at 10:17 PM 0
Share

I can try that, but this just randomly started so it's either Unity or my project.

avatar image Wolfrik_Creations · May 31, 2016 at 12:33 AM 0
Share

Okay so I tried a blank project and it still takes 10 seconds to click play (that has always happened, I'm used to it) but it leaves play mode instantly.

avatar image Wolfrik_Creations Wolfrik_Creations · May 31, 2016 at 12:39 AM 0
Share

What are some issues that could cause this?

I tried a blank SCENE in the same project and it freezes as well.

So it's the project, not the scene.

Update: It is in the scene but if I opening my loading screen scene and let it load until it gets to the scene that freezes, it doesn't freeze when stopping the game.

So it's only when the Editor is on that scene but if I were to load that scene it won't happen.

avatar image
0

Answer by MallNinjaMax · Sep 05, 2019 at 07:58 PM

I was having a similar issue, so I'll throw out my anecdote. I found out it was my tiny editor script I was no longer using, slowing down the exit from Play mode. When I commented OnInspectorGUI() out, everything went back to normal. Here's the script that was slowing it down:

 using UnityEditor;
 using UnityEngine;
 
 [CustomEditor(typeof(CoverPoints))]
 public class CoverCalculator : Editor
 {
     public override void OnInspectorGUI ()
     {
         DrawDefaultInspector();
 
         CoverPoints coverPoints = (CoverPoints)target;
         if(GUILayout.Button(new GUIContent("Calculate", "Calculate cover points.")))
         {
             coverPoints.Calculate();
         }
     }
 }

I get that OnInspectorGUI is probably a hefty function, but can anyone explain why it slows down the editor so much? It would be nice to use editor scripts in the future without completely killing my iteration time.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

56 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Monodevelop freezes opening js files after creating new project 1 Answer

Play mode completely locks up my computer 3 Answers

Unity frezes tying to open visual studio 2 Answers

Unity water causes frame drops and freezes (Unity 5) 1 Answer

Instantiating objects and adding navmeshAgent causes game to freeze. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges