Fixed an issue with the previous commit when sending custom user data using LiteNetLib.

This commit is contained in:
Karrar
2024-08-27 10:07:35 +03:00
parent 0a8e405e62
commit 1a28008960
7 changed files with 7 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -7,6 +7,7 @@ using System.Net;
using System.Net.Sockets;
using System;
using Netick.Unity;
using UnityEngine.UIElements;
namespace Netick.Transport
{
@@ -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)

View File

@@ -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",