diff --git a/xiaofang/Assets/ProtoBuf/test.cs b/xiaofang/Assets/ProtoBuf/test.cs index c88f9f10..6be6ea28 100644 --- a/xiaofang/Assets/ProtoBuf/test.cs +++ b/xiaofang/Assets/ProtoBuf/test.cs @@ -9,7 +9,7 @@ using Google.Protobuf; using System.Net.WebSockets; using System; using System.Threading.Tasks; -using static UnityEditor.Progress; + public class test : MonoBehaviour { public string token; @@ -567,17 +567,15 @@ public class test : MonoBehaviour //} foreach (var npcDict in NPCController.instance.npcsList) { - // 遍历每个字典中的键值对 foreach (var kvp in npcDict) { RecuseNpc npc = kvp.Key; // 获取 NPC 脚本(键) Vector3 position = kvp.Value; // 获取 NPC 的位置(值) - // 在这里,你可以使用 npc 和 position 进行其他操作 if (npcData.UserId == npc.npcId) { - //Debug.Log("================" + v); npc.SetNpcDes(v); + Debug.Log($"NPCID{npcData.UserId}NPCPOSITION{v}"); }