optimizing network stuff

This commit is contained in:
2025-07-30 05:51:39 +02:00
parent ea99249fe2
commit 159e9adcd7
56 changed files with 2272 additions and 1781 deletions

View File

@@ -1,7 +1,4 @@
using System;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Netcode;
using Unity.Collections;
using UnityEngine.Assertions;
namespace RebootKit.Engine.Network {
@@ -29,7 +26,7 @@ namespace RebootKit.Engine.Network {
return default;
}
public static void Deserialize<TEntity>(NativeArray<byte> data, ref TEntity entity)
public static void Deserialize<TEntity>(NativeSlice<byte> data, ref TEntity entity)
where TEntity : ISerializableEntity {
using NetworkBufferReader reader = new NetworkBufferReader(data);
if (reader.HasNext(data.Length)) {