Search Unity

Game pauses when out of focus

Discussion in 'Editor & General Support' started by tk7, Sep 9, 2021.

  1. tk7

    tk7

    Joined:
    Mar 9, 2016
    Posts:
    12
    I have a rather old game that's been through a lot of Unity upgrades. When the compiled game or the editor/player are out of focus, the entire game pauses. Everything, all scenes, GameObjects, and components.

    I'm assuming this must be a global project setting that somehow survived all of the Unity upgrades. This has been hard one to search for online. Anyone know of a project setting or some other global setting that would pause the entire player/game when the game window goes out of focus?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Beyond a certain number of upgrades I usually make a brand-new project and replace the ProjectSettings folder in my massively-upgraded project, then look in source control and undo all the diffs that wipe out my actual intended project settings, and finally go back and clean up anything I miss. Of course this presupposes you are using good source control and know your way around a visual differ!
     
  3. tk7

    tk7

    Joined:
    Mar 9, 2016
    Posts:
    12
    Did a compare of the project config file with a new project and found it.

    Edit -> Project Settings -> Player -> Resolution and Presentation -> Run In Background

    Just needed to be enabled.
     
    wojackmail, GGsparta and Kurt-Dekker like this.