From d12a8254161903798170cfb488c7fb2edae8c883 Mon Sep 17 00:00:00 2001 From: dooly Date: Tue, 7 Jan 2025 06:51:32 +1000 Subject: [PATCH] corrected a recycle missing --- .../BasisNetworkClientConsole/Program.cs | 3 +-- Basis Server/LiteNetLib/NetManager.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Basis Server/BasisNetworkClientConsole/BasisNetworkClientConsole/Program.cs b/Basis Server/BasisNetworkClientConsole/BasisNetworkClientConsole/Program.cs index e87e547ec..3cb5d1802 100644 --- a/Basis Server/BasisNetworkClientConsole/BasisNetworkClientConsole/Program.cs +++ b/Basis Server/BasisNetworkClientConsole/BasisNetworkClientConsole/Program.cs @@ -3,8 +3,6 @@ using BasisNetworkCore; using LiteNetLib; using LiteNetLib.Utils; -using System.Reflection.PortableExecutable; -using System.Runtime.Intrinsics.X86; using System.Text; using static Basis.Network.Core.Serializable.SerializableBasis; using static BasisNetworkPrimitiveCompression; @@ -107,6 +105,7 @@ private static void NetworkReceiveEvent(NetPeer peer, NetPacketReader Reader, by SSM.avatarSerialization.Serialize(Writer); LocalPLayer.Send(Writer, BasisNetworkCommons.MovementChannel, deliveryMethod); NetDataWriterPool.ReturnWriter(Writer); + Reader.Recycle(); } else { diff --git a/Basis Server/LiteNetLib/NetManager.cs b/Basis Server/LiteNetLib/NetManager.cs index 0d20be98b..caf9ba19a 100644 --- a/Basis Server/LiteNetLib/NetManager.cs +++ b/Basis Server/LiteNetLib/NetManager.cs @@ -1,4 +1,4 @@ -#if UNITY_2018_3_OR_NEWER +#if UNITY_2018_3_OR_NEWER #define UNITY_SOCKET_FIX #endif using System;