diff --git a/Mirror/Editor/NetworkAnimatorEditor.cs b/Mirror/Editor/NetworkAnimatorEditor.cs index 1ba87ed22..3c1665b3e 100644 --- a/Mirror/Editor/NetworkAnimatorEditor.cs +++ b/Mirror/Editor/NetworkAnimatorEditor.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEditor; using UnityEditor.Animations; @@ -93,4 +92,3 @@ void DrawControls() } } } -#endif diff --git a/Mirror/Editor/NetworkBehaviourInspector.cs b/Mirror/Editor/NetworkBehaviourInspector.cs index e42a8c5b1..70f75f1a7 100644 --- a/Mirror/Editor/NetworkBehaviourInspector.cs +++ b/Mirror/Editor/NetworkBehaviourInspector.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections; using System.Collections.Generic; @@ -170,4 +169,3 @@ public override void OnInspectorGUI() } } } //namespace -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkIdentityEditor.cs b/Mirror/Editor/NetworkIdentityEditor.cs index 1f9b64b5c..0e2da9459 100644 --- a/Mirror/Editor/NetworkIdentityEditor.cs +++ b/Mirror/Editor/NetworkIdentityEditor.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEditor; using UnityEngine; @@ -119,4 +118,3 @@ public override void OnInspectorGUI() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkInformationPreview.cs b/Mirror/Editor/NetworkInformationPreview.cs index 014b1ac31..c5a224887 100644 --- a/Mirror/Editor/NetworkInformationPreview.cs +++ b/Mirror/Editor/NetworkInformationPreview.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using UnityEditor; @@ -281,4 +280,3 @@ static NetworkIdentityInfo GetBoolean(string name, bool value) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkManagerEditor.cs b/Mirror/Editor/NetworkManagerEditor.cs index da404a67f..e62b9ff11 100644 --- a/Mirror/Editor/NetworkManagerEditor.cs +++ b/Mirror/Editor/NetworkManagerEditor.cs @@ -1,5 +1,4 @@ -#if ENABLE_UNET -using System; +using System; using System.IO; using System.Reflection; using UnityEditor; @@ -382,4 +381,3 @@ internal void RemoveButton(ReorderableList list) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkManagerHUDEditor.cs b/Mirror/Editor/NetworkManagerHUDEditor.cs index be8c1a370..f03a1b421 100644 --- a/Mirror/Editor/NetworkManagerHUDEditor.cs +++ b/Mirror/Editor/NetworkManagerHUDEditor.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using UnityEditor; @@ -378,4 +377,3 @@ public override void OnInspectorGUI() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkManagerPreview.cs b/Mirror/Editor/NetworkManagerPreview.cs index 9eb691f2b..99b65398d 100644 --- a/Mirror/Editor/NetworkManagerPreview.cs +++ b/Mirror/Editor/NetworkManagerPreview.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using UnityEditor; @@ -108,4 +107,3 @@ void GetNetworkInformation(NetworkManager man) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkScenePostProcess.cs b/Mirror/Editor/NetworkScenePostProcess.cs index 364048d76..b521f72b0 100644 --- a/Mirror/Editor/NetworkScenePostProcess.cs +++ b/Mirror/Editor/NetworkScenePostProcess.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System.Text; using System.Collections.Generic; using System.Linq; @@ -173,4 +172,3 @@ public static void OnPostProcessScene() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkTransformChildEditor.cs b/Mirror/Editor/NetworkTransformChildEditor.cs index e66ae3c0b..a342c7012 100644 --- a/Mirror/Editor/NetworkTransformChildEditor.cs +++ b/Mirror/Editor/NetworkTransformChildEditor.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using UnityEditor; using UnityEngine; using System.Collections; @@ -135,4 +134,3 @@ public override void OnInspectorGUI() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkTransformEditor.cs b/Mirror/Editor/NetworkTransformEditor.cs index a3e1bbcd8..d6f41c9a2 100644 --- a/Mirror/Editor/NetworkTransformEditor.cs +++ b/Mirror/Editor/NetworkTransformEditor.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEditor; using UnityEngine; @@ -209,4 +208,3 @@ public override void OnInspectorGUI() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Editor/NetworkTransformPreview.cs b/Mirror/Editor/NetworkTransformPreview.cs index 42bd31cea..796645c66 100644 --- a/Mirror/Editor/NetworkTransformPreview.cs +++ b/Mirror/Editor/NetworkTransformPreview.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEditor; using UnityEngine; @@ -83,4 +82,3 @@ void GetNetworkInformation(GameObject gameObject) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/ClientScene.cs b/Mirror/Runtime/ClientScene.cs index a6fa6baee..fa0e29f9b 100644 --- a/Mirror/Runtime/ClientScene.cs +++ b/Mirror/Runtime/ClientScene.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System.Collections.Generic; using UnityEngine; @@ -720,4 +719,3 @@ static void CheckForOwner(NetworkIdentity uv) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/CustomAttributes.cs b/Mirror/Runtime/CustomAttributes.cs index b0dd83cd0..e5250b4ca 100644 --- a/Mirror/Runtime/CustomAttributes.cs +++ b/Mirror/Runtime/CustomAttributes.cs @@ -1,8 +1,6 @@ using System; using UnityEngine; -#if ENABLE_UNET - namespace Mirror { [AttributeUsage(AttributeTargets.Class)] @@ -58,4 +56,3 @@ public class ClientCallbackAttribute : Attribute { } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/LocalClient.cs b/Mirror/Runtime/LocalClient.cs index 38d0c9fec..9c5c8363a 100644 --- a/Mirror/Runtime/LocalClient.cs +++ b/Mirror/Runtime/LocalClient.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using UnityEngine; @@ -131,4 +130,3 @@ internal void InvokeBytesOnClient(byte[] buffer) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/LocalConnections.cs b/Mirror/Runtime/LocalConnections.cs index e73056d44..6129f1911 100644 --- a/Mirror/Runtime/LocalConnections.cs +++ b/Mirror/Runtime/LocalConnections.cs @@ -1,8 +1,6 @@ using System; using UnityEngine; -#if ENABLE_UNET - namespace Mirror { // a server's connection TO a LocalClient. @@ -46,4 +44,3 @@ protected override bool SendBytes(byte[] bytes) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/LogFilter.cs b/Mirror/Runtime/LogFilter.cs index 430d9cc11..377dda0c3 100644 --- a/Mirror/Runtime/LogFilter.cs +++ b/Mirror/Runtime/LogFilter.cs @@ -1,7 +1,6 @@ using System; using UnityEngine; -#if ENABLE_UNET namespace Mirror { public class LogFilter @@ -26,4 +25,3 @@ public enum FilterLevel static public bool logError { get { return currentLogLevel <= FilterLevel.Error; } } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/Messages.cs b/Mirror/Runtime/Messages.cs index 4d18f3d8f..339e951d2 100644 --- a/Mirror/Runtime/Messages.cs +++ b/Mirror/Runtime/Messages.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using UnityEngine; -#if ENABLE_UNET - namespace Mirror { // This can't be an interface because users don't need to implement the @@ -16,9 +14,9 @@ public virtual void Deserialize(NetworkReader reader) {} // Serialize the contents of this message into the writer public virtual void Serialize(NetworkWriter writer) {} } - + // ---------- General Typed Messages ------------------- - + public class StringMessage : MessageBase { public string value; @@ -469,4 +467,3 @@ public override void Serialize(NetworkWriter writer) } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkAnimator.cs b/Mirror/Runtime/NetworkAnimator.cs index 395d5c076..e215161ad 100644 --- a/Mirror/Runtime/NetworkAnimator.cs +++ b/Mirror/Runtime/NetworkAnimator.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEngine; @@ -478,4 +477,3 @@ static internal void OnAnimationTriggerClientMessage(NetworkMessage netMsg) } } } -#endif diff --git a/Mirror/Runtime/NetworkBehaviour.cs b/Mirror/Runtime/NetworkBehaviour.cs index 42c3cb3f2..a7dfa27ab 100644 --- a/Mirror/Runtime/NetworkBehaviour.cs +++ b/Mirror/Runtime/NetworkBehaviour.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using System.ComponentModel; @@ -593,4 +592,3 @@ public virtual float GetNetworkSendInterval() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkClient.cs b/Mirror/Runtime/NetworkClient.cs index 5ddbfcc94..dccd4a80c 100644 --- a/Mirror/Runtime/NetworkClient.cs +++ b/Mirror/Runtime/NetworkClient.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using System.Net; @@ -315,4 +314,3 @@ internal static void SetActive(bool state) } }; } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkConnection.cs b/Mirror/Runtime/NetworkConnection.cs index 833e68197..b65b4d2a8 100644 --- a/Mirror/Runtime/NetworkConnection.cs +++ b/Mirror/Runtime/NetworkConnection.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using System.Text; @@ -353,4 +352,3 @@ internal void ResumeHandling() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkHash128.cs b/Mirror/Runtime/NetworkHash128.cs index 7ff90d7b7..096daf768 100644 --- a/Mirror/Runtime/NetworkHash128.cs +++ b/Mirror/Runtime/NetworkHash128.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEngine; @@ -88,4 +87,3 @@ public override string ToString() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkIdentity.cs b/Mirror/Runtime/NetworkIdentity.cs index aa4a8daf9..e484a1114 100644 --- a/Mirror/Runtime/NetworkIdentity.cs +++ b/Mirror/Runtime/NetworkIdentity.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -1069,4 +1068,3 @@ static internal void UNetStaticUpdate() } }; } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkInstanceId.cs b/Mirror/Runtime/NetworkInstanceId.cs index 340c1a6a3..19e4da070 100644 --- a/Mirror/Runtime/NetworkInstanceId.cs +++ b/Mirror/Runtime/NetworkInstanceId.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEngine; @@ -51,4 +50,3 @@ public override string ToString() internal static NetworkInstanceId Zero = new NetworkInstanceId(0); } } -#endif diff --git a/Mirror/Runtime/NetworkManager.cs b/Mirror/Runtime/NetworkManager.cs index f99523c4d..bbeebde68 100644 --- a/Mirror/Runtime/NetworkManager.cs +++ b/Mirror/Runtime/NetworkManager.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System.Collections.Generic; using System.Net; using System.Linq; @@ -877,4 +876,3 @@ public virtual void OnStopHost() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkManagerHUD.cs b/Mirror/Runtime/NetworkManagerHUD.cs index 39a907edb..de796a0c5 100644 --- a/Mirror/Runtime/NetworkManagerHUD.cs +++ b/Mirror/Runtime/NetworkManagerHUD.cs @@ -4,8 +4,6 @@ using System.ComponentModel; using UnityEngine; -#if ENABLE_UNET - namespace Mirror { [AddComponentMenu("Network/NetworkManagerHUD")] @@ -121,4 +119,3 @@ void OnGUI() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkProximityChecker.cs b/Mirror/Runtime/NetworkProximityChecker.cs index 353bd9178..5f67ba383 100644 --- a/Mirror/Runtime/NetworkProximityChecker.cs +++ b/Mirror/Runtime/NetworkProximityChecker.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using UnityEngine; @@ -120,4 +119,3 @@ public override void OnSetLocalVisibility(bool vis) } } } -#endif diff --git a/Mirror/Runtime/NetworkReader.cs b/Mirror/Runtime/NetworkReader.cs index be43b608e..1cd006679 100644 --- a/Mirror/Runtime/NetworkReader.cs +++ b/Mirror/Runtime/NetworkReader.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.IO; using UnityEngine; @@ -325,4 +324,3 @@ public override string ToString() } }; } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkScene.cs b/Mirror/Runtime/NetworkScene.cs index d4f7970fa..c0c0edbe1 100644 --- a/Mirror/Runtime/NetworkScene.cs +++ b/Mirror/Runtime/NetworkScene.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System.Collections.Generic; using UnityEngine; @@ -270,4 +269,3 @@ internal void DumpAllClientObjects() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkSceneId.cs b/Mirror/Runtime/NetworkSceneId.cs index 402cd737a..468c23cd6 100644 --- a/Mirror/Runtime/NetworkSceneId.cs +++ b/Mirror/Runtime/NetworkSceneId.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEngine; @@ -48,4 +47,3 @@ public override string ToString() public uint Value { get { return m_Value; } } } } -#endif diff --git a/Mirror/Runtime/NetworkServer.cs b/Mirror/Runtime/NetworkServer.cs index 093f296aa..38af34f58 100644 --- a/Mirror/Runtime/NetworkServer.cs +++ b/Mirror/Runtime/NetworkServer.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections.Generic; using System.Linq; @@ -1388,4 +1387,3 @@ static public bool SpawnObjects() } }; } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkStartPosition.cs b/Mirror/Runtime/NetworkStartPosition.cs index c61b4d7f9..1da0e662b 100644 --- a/Mirror/Runtime/NetworkStartPosition.cs +++ b/Mirror/Runtime/NetworkStartPosition.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEngine; @@ -19,4 +18,3 @@ public void OnDestroy() } } } -#endif diff --git a/Mirror/Runtime/NetworkTranformChild.cs b/Mirror/Runtime/NetworkTranformChild.cs index ff40f50e8..748c36ca4 100644 --- a/Mirror/Runtime/NetworkTranformChild.cs +++ b/Mirror/Runtime/NetworkTranformChild.cs @@ -1,7 +1,5 @@ -#if ENABLE_UNET using System; using UnityEngine; -using UnityEngine; namespace Mirror { @@ -455,4 +453,3 @@ public override float GetNetworkSendInterval() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkTransform.cs b/Mirror/Runtime/NetworkTransform.cs index 1a0273b1c..efad284f6 100644 --- a/Mirror/Runtime/NetworkTransform.cs +++ b/Mirror/Runtime/NetworkTransform.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using UnityEngine; @@ -1568,4 +1567,3 @@ public override void OnStartAuthority() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkTransformVisualizer.cs b/Mirror/Runtime/NetworkTransformVisualizer.cs index f5274b309..2de89f7ee 100644 --- a/Mirror/Runtime/NetworkTransformVisualizer.cs +++ b/Mirror/Runtime/NetworkTransformVisualizer.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.ComponentModel; using UnityEngine; @@ -165,4 +164,3 @@ static void CreateLineMaterial() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/NetworkWriter.cs b/Mirror/Runtime/NetworkWriter.cs index ec955e48d..edf253eaa 100644 --- a/Mirror/Runtime/NetworkWriter.cs +++ b/Mirror/Runtime/NetworkWriter.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.IO; using UnityEngine; @@ -382,4 +381,3 @@ public void Write(MessageBase msg) } }; } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/PlayerController.cs b/Mirror/Runtime/PlayerController.cs index 9d9733c47..f5aa11adf 100644 --- a/Mirror/Runtime/PlayerController.cs +++ b/Mirror/Runtime/PlayerController.cs @@ -1,7 +1,6 @@ using System; using UnityEngine; -#if ENABLE_UNET namespace Mirror { // This class represents the player entity in a network game, there can be multiple players per client @@ -35,4 +34,3 @@ public override string ToString() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/SyncList.cs b/Mirror/Runtime/SyncList.cs index 82547b9f3..bd5dcc4b9 100644 --- a/Mirror/Runtime/SyncList.cs +++ b/Mirror/Runtime/SyncList.cs @@ -1,4 +1,3 @@ -#if ENABLE_UNET using System; using System.Collections; using System.Collections.Generic; @@ -413,4 +412,3 @@ IEnumerator IEnumerable.GetEnumerator() } } } -#endif //ENABLE_UNET diff --git a/Mirror/Runtime/UNetwork.cs b/Mirror/Runtime/UNetwork.cs index 50b18c220..b3445c592 100644 --- a/Mirror/Runtime/UNetwork.cs +++ b/Mirror/Runtime/UNetwork.cs @@ -1,8 +1,6 @@ using System; using UnityEngine; -#if ENABLE_UNET - namespace Mirror { // Handles network messages on client and server @@ -137,6 +135,3 @@ public static bool UnpackMessage(byte[] message, out ushort msgType, out byte[] } } } - - -#endif //ENABLE_UNET