This commit is contained in:
Derek S 2021-04-06 10:30:15 -05:00
commit d6c8a0d09d
3 changed files with 23 additions and 5 deletions

View file

@ -13,8 +13,9 @@ using kcp2k;
#if UNITY_EDITOR
namespace LightReflectiveMirror
{
[CustomEditor(typeof(LightReflectiveMirrorTransport))]
public class LRMInspector : Editor
[UnityEditor.CustomEditor(typeof(LightReflectiveMirrorTransport))]
public class LRMInspector : UnityEditor.Editor
{
int serverPort = 7070;
string serverIP;
@ -251,4 +252,4 @@ namespace LightReflectiveMirror
}
}
}
#endif
#endif

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 588870f5e430f334592ddea2aedd6c98
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -331,7 +331,7 @@ namespace LightReflectiveMirror
{
for(int i = 0; i < relayServerList.Count; i++)
{
if(relayServerList[i].serverId == serverId)
if(relayServerList[i].serverId == serverID)
return relayServerList[i];
}
@ -372,12 +372,18 @@ namespace LightReflectiveMirror
public struct Room
{
public string serverName;
public int currentPlayers;
public int maxPlayers;
public int serverId;
public string serverData;
public int hostId;
public List<int> clients;
public RelayAddress relayInfo;
/// <summary>
/// This variable is only available on the client
/// </summary>
public int currentPlayers { get => clients.Count + 1; }
}
[Serializable]