From 3b8f911c12303a51c984ad1429ad95d6db6cdc0e Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Thu, 23 Nov 2023 14:25:55 +0800 Subject: [PATCH] 323 --- Assets/Zion/Scripts/Adam/GameManager.cs | 6 +----- Assets/Zion/Scripts/Adam/Utility/Net/AsyncWebReq.cs | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index 9cbd2fa6..9c6d0b7b 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -160,9 +160,7 @@ public class GameManager : MonoSingleton private IEnumerator WaitSpawn(string msg) { yield return new WaitForSeconds(0.5f); - Debug.Log(msg); string[] data = msg.Split(','); - switch (data[0]) { case "online": @@ -287,7 +285,7 @@ public class GameManager : MonoSingleton { if (string.IsNullOrWhiteSpace(obj)) return; string[] data = obj.Split(';'); - Debug.Log("datas=" + data[0]); + //Debug.Log("datas=" + data[0]); for (int i = 0; i < data.Length; i++) { int index = i; @@ -303,9 +301,7 @@ public class GameManager : MonoSingleton userIds.Add(ulong.Parse(userInfo[0])); } } - SpawnDevice(); - string msg = $"send2room online,{ulong.Parse(GlobalFlag.currentUser.user_id)},{GlobalFlag.currentUser.login_name},{ulong.Parse(GlobalFlag.roomID)}"; _ = SyncCreateRoom.SendMessageAsync(msg); } diff --git a/Assets/Zion/Scripts/Adam/Utility/Net/AsyncWebReq.cs b/Assets/Zion/Scripts/Adam/Utility/Net/AsyncWebReq.cs index 475d600b..115ba526 100644 --- a/Assets/Zion/Scripts/Adam/Utility/Net/AsyncWebReq.cs +++ b/Assets/Zion/Scripts/Adam/Utility/Net/AsyncWebReq.cs @@ -17,7 +17,7 @@ public static class AsyncWebReq var getRequest = CreateRequest(endpoint); await getRequest.SendWebRequest(); #if UNITY_EDITOR - Debug.Log("async Get req : " + getRequest.downloadHandler.text); + //Debug.Log("async Get req : " + getRequest.downloadHandler.text); #endif T result = JsonUtility.FromJson(getRequest.downloadHandler.text); getRequest.Dispose(); @@ -30,8 +30,8 @@ public static class AsyncWebReq var postRequest = CreateRequest(endpoint, RequestType.POST, payload); await postRequest.SendWebRequest(); #if UNITY_EDITOR - Debug.Log("async Post req : " + postRequest.downloadHandler.text); - Debug.Log("endpoint : " + endpoint); + //Debug.Log("async Post req : " + postRequest.downloadHandler.text); + //Debug.Log("endpoint : " + endpoint); #endif T result = JsonUtility.FromJson(postRequest.downloadHandler.text); postRequest.Dispose(); @@ -45,7 +45,7 @@ public static class AsyncWebReq { string reqJson = JsonConvert.SerializeObject(data); #if UNITY_EDITOR - Debug.Log($"async req json : {reqJson}"); + //Debug.Log($"async req json : {reqJson}"); #endif var bodyRaw = Encoding.UTF8.GetBytes(reqJson); request.uploadHandler = new UploadHandlerRaw(bodyRaw); @@ -70,7 +70,7 @@ public static class AsyncWebReq yield return request.SendWebRequest();//发送请求 if (request.isNetworkError || request.isHttpError) { - Debug.Log("cannot get data:" + request.responseCode); + //Debug.Log("cannot get data:" + request.responseCode); action(null); } else