Skip to content

NetworkManager forces Application.runInBackground globally even when networking is inactive #954

@Pattrigue

Description

@Pattrigue

General
Unity version: 6.1.15
Fish-Networking version: 4.6.12R
Discord link: I did not troubleshoot this on Discord, as it is an apparent flaw with the way this was implemented.

Description
The NetworkManager has a _runInBackground property which, when enabled, unconditionally sets Application.runInBackground in Awake and again in the TimeManager_OnLateUpdate callback.

This means the application will always run in the background whenever NetworkManager exists in the scene, even if no client or server is active.

For games where multiplayer is optional (e.g., mostly singleplayer with occasional online sessions), this is undesirable.

The documentation itself states:

Running in the background is often essential for clients, and especially for the server.

This suggests it should only be enforced while networking is active, not globally.

Replication
Steps to reproduce the behavior:
Just run your game with a NetworkManager whose "Run in background" property is set to true.

Expected behavior

  • The _runInBackground property should only affect Application.runInBackground while a network session (server or client) is active.
  • When networking is inactive, Unity’s project-level setting should be respected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ReceivedThe issue appears to be complete and will be reviewed.Resolved Pending ReleaseIssue is resolved and will be available on the noted version.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions