working on multiplayer - still delay with more actors :/

This commit is contained in:
2025-07-21 09:05:24 +02:00
parent 3c13cc3034
commit 0d8cc0e291
10 changed files with 115 additions and 57 deletions

View File

@@ -1,4 +1,5 @@
using RebootKit.Engine.Main;
using RebootKit.Engine.Network;
using RebootKit.Engine.Simulation;
using Unity.Netcode;
using UnityEngine;
@@ -6,10 +7,14 @@ using UnityEngine.AddressableAssets;
namespace RebootReality.jelycho.Beacons {
public class BaseManagerActorData : IActorData {
public void Serialize(FastBufferWriter writer) {
public void Serialize(NetworkBufferWriter writer) {
}
public void Deserialize(FastBufferReader reader) {
public void Deserialize(NetworkBufferReader reader) {
}
public int GetMaxBytes() {
return 0;
}
}
@@ -21,12 +26,16 @@ namespace RebootReality.jelycho.Beacons {
public struct SpawnBeaconCommandData : ISerializableEntity {
public Vector3 Position;
public void Serialize(FastBufferWriter writer) {
writer.WriteValue(Position);
public void Serialize(NetworkBufferWriter writer) {
writer.Write(Position);
}
public void Deserialize(FastBufferReader reader) {
reader.ReadValue(out Position);
public void Deserialize(NetworkBufferReader reader) {
reader.Read(out Position);
}
public int GetMaxBytes() {
return 0;
}
}