Search Unity

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. Well if you click on this...
    upload1.PNG
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    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.