From 8d7d023ea67b850ce2a8f77fdac123095768acdd Mon Sep 17 00:00:00 2001 From: baletiballo <75846481+baletiballo@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:45:42 +0100 Subject: [PATCH] minor cleanup; replaced deprecated function and formatString --- Assets/Scripts/InventoryStuff/ActiveScroll.cs | 7 +++---- Assets/Scripts/UI/InGame/ScrollDetails.cs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/InventoryStuff/ActiveScroll.cs b/Assets/Scripts/InventoryStuff/ActiveScroll.cs index 65e9ab69..ed80066b 100644 --- a/Assets/Scripts/InventoryStuff/ActiveScroll.cs +++ b/Assets/Scripts/InventoryStuff/ActiveScroll.cs @@ -386,7 +386,7 @@ private IEnumerator _SendAssignments() if (errors.Length > 0) OnScrollDynamicInfoError.Invoke(errors); - _ProcessScrollDynamicInfo(scrollDynamicInfo); + _ProcessScrollDynamicInfo(scrollDynamicInfo); } } @@ -455,11 +455,10 @@ private IEnumerator SendView(string endpoint) www.method = UnityWebRequest.kHttpVerbPOST; www.SetRequestHeader("Content-Type", "application/json"); - System.DateTime sendTime = System.DateTime.UtcNow; + DateTime sendTime = DateTime.UtcNow; yield return www.SendWebRequest(); //if (VerboseURI) - Debug.LogFormat("Server answered in : {0}ms" - , (System.DateTime.UtcNow - sendTime).TotalMilliseconds); + Debug.Log($"Server answered to {endpoint} in : {(DateTime.UtcNow - sendTime).TotalMilliseconds} ms"); if (www.result == UnityWebRequest.Result.ConnectionError || www.result == UnityWebRequest.Result.ProtocolError) diff --git a/Assets/Scripts/UI/InGame/ScrollDetails.cs b/Assets/Scripts/UI/InGame/ScrollDetails.cs index ec1fd977..28da4ac6 100644 --- a/Assets/Scripts/UI/InGame/ScrollDetails.cs +++ b/Assets/Scripts/UI/InGame/ScrollDetails.cs @@ -30,7 +30,7 @@ void Awake() { Instance = this; - if (cursor == null) cursor = FindObjectOfType<WorldCursor>(); + if (cursor == null) cursor = FindAnyObjectByType<WorldCursor>(); Popup = mmtAnswerPopUp.GetComponent<PopupBehavior>(); Popup.gameObject.SetActive(true); // force Awake -- GitLab