Unity freezes when window inactive - any workaround?

Hi!

When I play my game in Editor or as a built runtime, it freezes when the gaming-window is inactive (Windows - just click anywhere else or activate another program). For single-player thats cool. But in multiplayer, I still need the refreshing of the viewport. Is there any option I can do?

Thanks,

Throrolf

Good work. Just a minor improvement: if (!immuneTo.Contains (typeOfDamage)) { //note the ! currentHP -= damageGiver.damageDealt; StartCoroutine (CheckLife ()); } " ! " turns it around so it tests: if NOT immuneTo... then do something. So you don't have extra unnecessary lines if you don't want to put anything in there.

–

1 Answer

1

Go to Edit -> Project Settings -> Player, and tick "Run In Background".

This works for both standalone builds and webplayer builds.

Yeah, it works, thanks!

–

where the edit?

–

Converted your answer to comment. In the future please use the Add new comment button when posting comments. At the top of unity window, there is File Edit Assets etc

–