mirror of
https://github.com/Kaveinator/NetickProForUnity.git
synced 2025-10-26 09:49:06 -07:00
Fixed an issue with the previous commit when sending custom user data using LiteNetLib.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user