diff --git a/Client.cs b/Client.cs index 27b474d..c5ca156 100644 --- a/Client.cs +++ b/Client.cs @@ -53,7 +53,7 @@ namespace Passer.Control { ProcessThing(thing); break; case NameMsg name: - UnityEngine.Debug.Log($"Name [{name.networkId}/{name.thingId}] {name.name}"); + //UnityEngine.Debug.Log($"Name [{name.networkId}/{name.thingId}] {name.name}"); ProcessName(name); break; case ModelUrlMsg modelUrl: diff --git a/Messages.cs b/Messages.cs index 59439b0..c49ac02 100644 --- a/Messages.cs +++ b/Messages.cs @@ -171,6 +171,7 @@ namespace Passer.Control { public static bool Send(Client client, byte networkId, byte thingId) { InvestigateMsg msg = new(networkId, thingId); + //UnityEngine.Debug.Log($"Send investigate [{msg.networkId}/{msg.thingId}]"); return SendMsg(client, msg); } public static async Task Receive(Stream dataStream, Client client, byte packetSize) { @@ -179,6 +180,8 @@ namespace Passer.Control { byte[] buffer = await Receive(dataStream, packetSize); InvestigateMsg msg = new(buffer); + //UnityEngine.Debug.Log($"Receive investigate [{msg.networkId}/{msg.thingId}]"); + client.messageQueue.Enqueue(msg); return true; @@ -198,6 +201,7 @@ namespace Passer.Control { public byte parentId; public ThingMsg(byte networkId, byte thingId, byte thingType, byte parentId) { + this.networkId = networkId; this.thingId = thingId; this.thingType = thingType; this.parentId = parentId; @@ -222,8 +226,9 @@ namespace Passer.Control { this.parentId = buffer[ix]; } - public static bool Send(Client client, byte thingId, byte thingType, byte parentId) { - ThingMsg msg = new(client.networkId, thingId, thingType, parentId); + public static bool Send(Client client, byte networkId, byte thingId, byte thingType, byte parentId) { + ThingMsg msg = new(networkId, thingId, thingType, parentId); + //UnityEngine.Debug.Log($"Send thing [{msg.networkId}/{msg.thingId}]"); return SendMsg(client, msg); } public static async Task Receive(Stream dataStream, Client client, byte packetSize) { @@ -232,6 +237,7 @@ namespace Passer.Control { byte[] buffer = await Receive(dataStream, packetSize); ThingMsg msg = new(buffer); + //UnityEngine.Debug.Log($"Receive thing [{msg.networkId}/{msg.thingId}]"); // Do no process poses with nwid == 0 (== local) //if (msg.networkId == 0)