Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity stops executing when I click the mouse

Discussion in 'Getting Started' started by riversongsabc, Aug 2, 2019.

  1. riversongsabc

    riversongsabc

    Joined:
    Jul 19, 2019
    Posts:
    1
    Why does Unity stop executing my program when I click the mouse? I have seen many instructional videos where the instructor makes changes in the inspector for example and his program continues to execute. Am I missing a setting somewhere?
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,486
    Well if you click on this...
    upload1.PNG
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,495
    What are you clicking on? Can you be more specific?

    If you have "run in background" disabled (default I believe), and the game loses focus, then it will stop playing until the window gets focus again.

    If you have Error Pause enabled (I think another default setting now?) and your click action generates an error in the game while running in the editor (see the console), then the game will pause.

    If you have code in your game which on click changes timescale to 0 then the game will appear to pause.