diff --git a/Assets/Scripts/Networking/NetManager.cs b/Assets/Scripts/Networking/NetManager.cs index 48df4c55..131873e5 100644 --- a/Assets/Scripts/Networking/NetManager.cs +++ b/Assets/Scripts/Networking/NetManager.cs @@ -14,6 +14,8 @@ namespace SanAndreasUnity.Net public static bool dontListen { get { return NetworkServer.dontListen; } set { NetworkServer.dontListen = value; } } + public static int maxNumPlayers => NetworkManager.singleton.maxConnections; + public static TelepathyTransport telepathyTransport { get { return ((TelepathyTransport)Transport.activeTransport); } } public static string onlineScene { diff --git a/Assets/Scripts/Stats/NetStats.cs b/Assets/Scripts/Stats/NetStats.cs index af878f2c..bcad1349 100644 --- a/Assets/Scripts/Stats/NetStats.cs +++ b/Assets/Scripts/Stats/NetStats.cs @@ -23,6 +23,7 @@ namespace SanAndreasUnity.Stats { Utilities.GUIUtils.DrawHorizontalLine(1, 1, Color.black); GUILayout.Label("Num connections: " + NetworkServer.connections.Count); + GUILayout.Label("Max num players: " + NetManager.maxNumPlayers); } if (NetStatus.IsClientActive())