Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 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
11
Question by Raigex · Jul 19, 2012 at 02:14 PM · unityeditorplayplaymode

Why does unity editor hang when play button is pressed.

I am having a problem. Whenever I press the play button on the Unity Editor It freezes my whole program. I have to go to the Windows Task Manager and End Task it. Does anyone know why that happens and how to fix it?

Also I am running windows 7 64 bit edition if that will help.

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 Doireth · Jul 20, 2012 at 01:43 PM 0
Share

It sounds like a script problem. Can you post any potentially problematic script or give any further information such as in-game operations or when the problem started occurring?

avatar image Raigex · Jul 20, 2012 at 01:48 PM 0
Share

The thing is, it has been happening since I installed unity. At first I thought it was my ARCamera (using QCAR toolkit) but then i also noticed that it happens when all i have are an empty project and a script that adds gui

void OnGUI() { if(GUI.Button(new Rect(...), "some Title") { Debug.Log("Some debug test"); } }

and like I said in the other answers this happens sporatically, a couple times right after i turn on my computer and unity, and then every couple of times i press play afterwards,(yes even with an empty project i want to check out).

avatar image Doireth · Jul 20, 2012 at 01:55 PM 0
Share

A lot of freezes and crashes come from firewalls or an anti-virus program.

Shot in the dark I know but try disabling such programs and try again.

avatar image Raigex · Jul 20, 2012 at 01:56 PM 0
Share

Well ill try that Ill see if it stops the crashes.

avatar image robindelange · May 23, 2013 at 07:10 PM 0
Share

Did somebody find a solution to this? I am having the same problem for a couple of days now, really annoying. I already tried re-installing different versions of Unity, different drivers for my graphics card, running as ad$$anonymous$$istrator, changing player settings.

Anyone?

Show more comments

5 Replies

· Add your reply
  • Sort: 
avatar image
21
Best Answer

Answer by Raigex · Aug 16, 2012 at 08:41 PM

This was a pure accident but I have found what hangs my Unity Editor. It hangs when my player settings are set to Android. When it hung I turned on my task manager to end task it but the tab was processes. I noticed that I had like 20 adb.exe running (one for each time it hung). I started deleting them and like magic the play button works.

So my answer is (only for ANDROID so far) If your unity editor hangs, check your task manager and delete all your adb.exe this should allow it to continue to function.

Comment
Add comment · Show 6 · 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 rizawerx · Aug 06, 2013 at 03:58 PM 0
Share

I also experienced this for last couple of days...very frustrating..at first I thought it becaused I upgraded to 4.2 from 3.5.7, but then I reinstalled 3.5.7 but problem still there.. I tried to switch platform but no good... But I recalled that I just upgraded android SD$$anonymous$$ from 16 to the latest, because unity 4.2 need that upgrade...I think since then the problem arose... But, fortunately, the build command is not effected...I can still build the project to android apk...

avatar image Yanifska_ · Nov 05, 2013 at 09:12 PM 0
Share

THAN$$anonymous$$ YOU SO $$anonymous$$UCH. You saved me a lot of headache in the future. Too bad I didnt look for the answer BEFORE quitting unity though...but it's ok I learnt something useful at least.

avatar image Roman Volodin · Nov 13, 2013 at 08:23 PM 0
Share

Thanks man, i had the same problem BUT i was using Win/$$anonymous$$ac/Linux platform...$$anonymous$$y Unity version is 4.2.2 so i don't think this is a platform issue. I ended adb.exe processes and it helped me )

avatar image brag42 · Jan 20, 2014 at 06:39 PM 0
Share

I had the same freezing problem and found your post. I deleted the adb.exe processes and it fixed my freezing/hanging problem. Thanks a ton!

Here's my post: http://answers.unity3d.com/questions/621341/432-freezes-when-i-click-play.html

avatar image nemPyong · Oct 29, 2014 at 02:28 PM 0
Share

Thank you very much Sir! Solved my problem too.

Show more comments
avatar image
7

Answer by Bunny83 · Jul 20, 2012 at 01:18 PM

You probably coded an infinite loop somewhere that runs at start...

Try disabling your scripts to see which one is the faulty one and then add it to your question by press edit.

Comment
Add comment · Show 18 · 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 Raigex · Jul 20, 2012 at 01:22 PM 1
Share

If there was an infinite loop it would hang all the time. This happens even when all I have is an OnGui function with a if(GUI.Button(...)) function. Not always but it happens.

avatar image Bunny83 · Jul 20, 2012 at 01:35 PM 0
Share

Do you mean you've tried creating a new empty project and when you run it, it still freezes?

avatar image Raigex · Jul 20, 2012 at 01:37 PM 0
Share

Yes, not always but the first couple of times i press play it freezes. I have to end task it and then turn on unity again. I do this 2 or 3 times until finally it starts working but the constant restarts are getting annoying. Also my target platform is the Android, if that changes anything. And when it hangs the play pause and fastforward buttons dont even turn blue, the play just gets stuck in clicked mode and i cannot do anything in unity anymore

avatar image whydoidoit · Jul 20, 2012 at 02:09 PM 0
Share

Actually this happens to me frequently (but inconsistenly) as well. Especially if debugging, but in some cases when I am not. It has been happening since I started developing in Unity and I have switched between multiple different projects (and languages, and versions) over that time. I've been living with it, but would dearly love to know what is happening. I'm running on a $$anonymous$$ac with nothing very special going on.

I've been wondering if it is Time $$anonymous$$achine

avatar image Raigex · Jul 20, 2012 at 02:11 PM 0
Share

So I guess we are two of the few unlucky ones that this happens to. Damn i guess I'll have to live with it.

Show more comments
avatar image
2

Answer by wreyes · Mar 11, 2015 at 09:26 AM

I had the same issue. Mine was cause by the NavMesh. I cleared the baked NavMesh and all was fine. My thoughts are that there was too much data.

An FYI, I was able to debug this by using the Profiler (Unity Pro Only I believe).

Hope that helps.

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
avatar image
0

Answer by regie · Jul 19, 2012 at 02:49 PM

It is possible that it has nothing with your computer. Check if you haven't some exceptions, objects have references to scripts, etc. I had the same problem.

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 Raigex · Jul 19, 2012 at 02:51 PM 0
Share

No exceptions found. $$anonymous$$y Console is clear. I just hangs when i press play especially the first couple of times after i turn on my computer.

avatar image
0

Answer by ashfaqueck · Nov 08, 2016 at 12:59 PM

using UnityEngine; using System.Collections;

public class Scroller : MonoBehaviour {

 public int maxPlatform = 20;
 public GameObject platForm;
 public float horizontalMax=14f;
 public float horizontalMin=6.5f;
 public float verticalMax=6f;
 public float verticalMin=-6f;
 private Vector2 originPosition;


 // Use this for initialization
 void Start () 
 {
     originPosition = transform.position;
     spawn();
 }
 
 // Update is called once per frame
 void Update ()
 {
 
 }

 void spawn()
 {
     
     for (int i = 0; i < maxPlatform; i++)
     {
         Vector2  randomPosition=originPosition+ new Vector2 (Random.Range(horizontalMin,horizontalMax),Random.Range(verticalMin,verticalMax));
         Instantiate(platForm, randomPosition, Quaternion.identity);
         originPosition = randomPosition;
     }
 }

}

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

22 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

Related Questions

Networking - Unity stuck by pressing play button in editor 2018 2 1 Answer

How do you play video in unity? 5 Answers

Playmode don't works 3 Answers

Why is unity crashing on "Play mode" 1 Answer

Unity internal error in Playtest mode. What is the cause and how do I prevent it?? 0 Answers


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