From 86edd46ab5eb01e53f1cf93ef20d71661ad99dae Mon Sep 17 00:00:00 2001 From: Derek S <44935661+Derek-R-S@users.noreply.github.com> Date: Tue, 6 Apr 2021 13:33:00 -0500 Subject: [PATCH] Fixed Custom Inspector not compiling --- UnityTransport/Editor/LRMInspector.cs | 11 +++++------ UnityTransport/Editor/LRMInspector.cs.meta | 11 ----------- .../LRMTransport/LightReflectiveMirrorTransport.cs | 2 ++ 3 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 UnityTransport/Editor/LRMInspector.cs.meta diff --git a/UnityTransport/Editor/LRMInspector.cs b/UnityTransport/Editor/LRMInspector.cs index 18220fe..2bfdd74 100644 --- a/UnityTransport/Editor/LRMInspector.cs +++ b/UnityTransport/Editor/LRMInspector.cs @@ -10,12 +10,11 @@ using Mirror.SimpleWeb; using System; using kcp2k; -#if UNITY_EDITOR namespace LightReflectiveMirror { - [UnityEditor.CustomEditor(typeof(LightReflectiveMirrorTransport))] - - public class LRMInspector : UnityEditor.Editor +#if UNITY_EDITOR + [CustomEditor(typeof(LightReflectiveMirrorTransport))] + public class LRMInspector : Editor { int serverPort = 7070; string serverIP; @@ -251,5 +250,5 @@ namespace LightReflectiveMirror } } } -} -#endif \ No newline at end of file +#endif +} \ No newline at end of file diff --git a/UnityTransport/Editor/LRMInspector.cs.meta b/UnityTransport/Editor/LRMInspector.cs.meta deleted file mode 100644 index fa00e6b..0000000 --- a/UnityTransport/Editor/LRMInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 588870f5e430f334592ddea2aedd6c98 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityTransport/LRMTransport/LightReflectiveMirrorTransport.cs b/UnityTransport/LRMTransport/LightReflectiveMirrorTransport.cs index 3748269..96e510d 100644 --- a/UnityTransport/LRMTransport/LightReflectiveMirrorTransport.cs +++ b/UnityTransport/LRMTransport/LightReflectiveMirrorTransport.cs @@ -98,8 +98,10 @@ namespace LightReflectiveMirror throw new Exception("LRM | Client to Server Transport cannot be LRM."); SetTransportPort(port); + this.serverIP = serverIP; + _clientSendBuffer = new byte[clientToServerTransport.GetMaxPacketSize()]; clientToServerTransport.ClientConnect(serverIP); }