diff --git a/Netick/Editor/Netick.Unity.Editor.dll b/Netick/Editor/Netick.Unity.Editor.dll index c3f4e47..ef6b868 100644 Binary files a/Netick/Editor/Netick.Unity.Editor.dll and b/Netick/Editor/Netick.Unity.Editor.dll differ diff --git a/Netick/Editor/Netick.Unity.Pro.Editor.dll b/Netick/Editor/Netick.Unity.Pro.Editor.dll index 3f57b69..9c52418 100644 Binary files a/Netick/Editor/Netick.Unity.Pro.Editor.dll and b/Netick/Editor/Netick.Unity.Pro.Editor.dll differ diff --git a/Netick/Editor/Unity.Netick.CodeGen.dll b/Netick/Editor/Unity.Netick.CodeGen.dll index e63e03f..f57ec56 100644 Binary files a/Netick/Editor/Unity.Netick.CodeGen.dll and b/Netick/Editor/Unity.Netick.CodeGen.dll differ diff --git a/Netick/Runtime/Netick.Unity.Pro.dll b/Netick/Runtime/Netick.Unity.Pro.dll index 82f4b68..1d490b6 100644 Binary files a/Netick/Runtime/Netick.Unity.Pro.dll and b/Netick/Runtime/Netick.Unity.Pro.dll differ diff --git a/Netick/Runtime/Netick.Unity.dll b/Netick/Runtime/Netick.Unity.dll index 086899b..be7d20d 100644 Binary files a/Netick/Runtime/Netick.Unity.dll and b/Netick/Runtime/Netick.Unity.dll differ diff --git a/Transport/LiteNetLib Transport/LiteNetLibTransportProvider.cs b/Transport/LiteNetLib Transport/LiteNetLibTransportProvider.cs index 66dcc45..94bf961 100644 --- a/Transport/LiteNetLib Transport/LiteNetLibTransportProvider.cs +++ b/Transport/LiteNetLib Transport/LiteNetLibTransportProvider.cs @@ -7,6 +7,7 @@ using System.Net; using System.Net.Sockets; using System; using Netick.Unity; +using UnityEngine.UIElements; namespace Netick.Transport { @@ -16,7 +17,7 @@ namespace Netick.Transport [Tooltip("Time duration (in seconds) until a connection is dropped when no packets were received.")] public float DisconnectTimeout = 5; [Tooltip("Time interval (in seconds) between connection attempts.")] - public float ReconnectInterval = 0.5f; + public float ReconnectInterval = 0.5f; [Tooltip("Max number of connect attempts.")] public int MaxConnectAttempts = 10; [Tooltip("LiteNetLib internal logic update interval (in seconds).")] @@ -222,6 +223,10 @@ namespace Netick.Transport if (_clients.TryGetValue(peer, out var c)) { var len = reader.AvailableBytes; + + if (_bytes.Length < reader.AvailableBytes) + _bytes = new byte[reader.AvailableBytes]; + reader. GetBytes(_bytes, 0, reader.AvailableBytes); fixed(byte* ptr = _bytes) diff --git a/package.json b/package.json index 7a2e773..0c2db01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.karrar.netick", - "version": "0.12.23", + "version": "0.12.24", "displayName": "Netick", "description": "A networking solution for Unity", "unity": "2021.3",