Problem
When running the game in windowed or borderless mode, the game pauses or sometimes minimizes when focus is lost (e.g. clicking outside or alt-tabbing).
This makes multitasking difficult and differs from behavior in newer Unity-based games.
Cause
This appears to be Unity's default behavior where:
Application.runInBackground = false
When the window loses focus, Unity pauses or throttles the game.
Fix
Setting:
Application.runInBackground = true;
prevents the pause entirely and allows the game to continue running when unfocused.
Testing
I verified this by patching Assembly-CSharp.dll (DotMod version) via dnSpy:
public void Start()
{
Application.runInBackground = true;
}
Problem
When running the game in windowed or borderless mode, the game pauses or sometimes minimizes when focus is lost (e.g. clicking outside or alt-tabbing).
This makes multitasking difficult and differs from behavior in newer Unity-based games.
Cause
This appears to be Unity's default behavior where:
Application.runInBackground = false
When the window loses focus, Unity pauses or throttles the game.
Fix
Setting:
Application.runInBackground = true;
prevents the pause entirely and allows the game to continue running when unfocused.
Testing
I verified this by patching Assembly-CSharp.dll (DotMod version) via dnSpy: