Skip to content

Commit

Permalink
fix(NetworkManagerHud): returning to offline menu when server or clie…
Browse files Browse the repository at this point in the history
…nt is stopped
  • Loading branch information
James-Frowen committed Jun 27, 2021
1 parent a27fe9a commit 6b4c988
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Mirage/Components/NetworkManagerHud.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ private void Start()
{
DontDestroyOnLoad(transform.root.gameObject);
Application.runInBackground = true;

// return to offset menu when server or client is stopped
NetworkManager.Server.Stopped.AddListener(OfflineSetActive);
NetworkManager.Client.Disconnected.AddListener(_ => OfflineSetActive());
}

void SetLabel(string value)
Expand Down

0 comments on commit 6b4c988

Please sign in to comment.