feat: added "menu" panic button
This avoids restarting the game when encountering an unknown issue.
This commit is contained in:
parent
b9a7a1c479
commit
34d9e9261e
4 changed files with 46 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using GB.Core;
|
||||
using GB.Networking.Utils;
|
||||
using GB.Platform.Lobby;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -21,4 +22,11 @@ public class GBSUClient : MonoBehaviour
|
|||
GBSUGui.PushError("You are currently hosting a game! Please stop your server before attempting to join.");
|
||||
}
|
||||
}
|
||||
|
||||
// this method should be used when something has went wrong
|
||||
// because players can just use the escape menu to exit
|
||||
public static void DisconnectFromServer()
|
||||
{
|
||||
GBNetUtils.DisconnectSelf(false);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue