diff --git a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/Editor/LRMInspector.cs b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/Editor/LRMInspector.cs index 2bfdd74..13e9014 100644 --- a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/Editor/LRMInspector.cs +++ b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/Editor/LRMInspector.cs @@ -231,6 +231,7 @@ namespace LightReflectiveMirror // Other tab... GUI.enabled = false; + EditorGUILayout.TextField("Server Status", lrm.serverStatus); EditorGUILayout.TextField("Server ID", lrm.serverId == -1 ? "Not Hosting" : lrm.serverId.ToString()); GUI.enabled = true; diff --git a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportRequests.cs b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportRequests.cs index 994ea2f..c26d434 100644 --- a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportRequests.cs +++ b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportRequests.cs @@ -21,7 +21,7 @@ namespace LightReflectiveMirror IEnumerator RelayConnect() { string url = $"http://{loadBalancerAddress}:{loadBalancerPort}/api/join/"; - + serverStatus = "Waiting for LLB..."; using (UnityWebRequest webRequest = UnityWebRequest.Get(url)) { // Request and wait for the desired page. diff --git a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportVariables.cs b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportVariables.cs index fb9c0ec..1f0a979 100644 --- a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportVariables.cs +++ b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportVariables.cs @@ -37,6 +37,7 @@ namespace LightReflectiveMirror public List relayServerList { private set; get; } = new List(); // Current Server Information + public string serverStatus = "Not Started."; public int serverId = -1; private LRMDirectConnectModule _directConnectModule; diff --git a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LightReflectiveMirrorTransport.cs b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LightReflectiveMirrorTransport.cs index 96e510d..abb58e4 100644 --- a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LightReflectiveMirrorTransport.cs +++ b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LightReflectiveMirrorTransport.cs @@ -59,6 +59,7 @@ namespace LightReflectiveMirror _connectedToRelay = false; _isAuthenticated = false; diconnectedFromRelay?.Invoke(); + serverStatus = "Disconnected from relay."; } public void ConnectToRelay() @@ -101,7 +102,7 @@ namespace LightReflectiveMirror this.serverIP = serverIP; - + serverStatus = "Connecting to relay..."; _clientSendBuffer = new byte[clientToServerTransport.GetMaxPacketSize()]; clientToServerTransport.ClientConnect(serverIP); } @@ -150,9 +151,11 @@ namespace LightReflectiveMirror switch (opcode) { case OpCodes.Authenticated: + serverStatus = "Authenticated! Good to go!"; _isAuthenticated = true; break; case OpCodes.AuthenticationRequest: + serverStatus = "Sent authentication to relay..."; SendAuthKey(); break; case OpCodes.GetData: