0
\$\begingroup\$

Soon after I press the Play button, the Unity break button automatically gets activated: Unity gets into Pause mode:

enter image description here

I have attached the Unity debugger to my C# code, but Visual Studio doesn't break.

How could I find out the reason why Unity goes into Break mode?

Thank you!

Edit: Per request, here is the button before pressing Play:

enter image description here

And here is what the console looks like after the error occured:

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Show me what the button looks like before you press the play button \$\endgroup\$
    – Bálint
    Jul 3 '19 at 23:50
  • \$\begingroup\$ Can you search your project to find whether any of your scripts or imported assets/libraries are setting EditorApplication.isPaused? \$\endgroup\$
    – DMGregory
    Jul 4 '19 at 2:33
  • \$\begingroup\$ @DMGregory I don't have that. \$\endgroup\$
    – tmighty
    Jul 4 '19 at 13:16
1
\$\begingroup\$

I had a Debug.Break(); statement in my code. Even though attached, the VS debugger didn't indicate where it stopped.

I'm not sure if that is bug. I was expecting VS to indicate where it stops if the debugger is attached.

I have asked the bug report team this question, and I will update my answer as soon as I hear back from them.

\$\endgroup\$
0
\$\begingroup\$

Try opening the console (bottom left). If the "pause on error" option is enabled and you get an error, it will pause the game. Maybe you had it on.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you, but it wasn't enabled. I have attached a screenshot to my posting. \$\endgroup\$
    – tmighty
    Jul 3 '19 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.