From 34fffe6daa549a60437b224387a9936bdfa34c05 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 17:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/UIPrefab/UITipWindow.prefab | 4 ++-- Assets/Scripts/TimeScaleController.cs | 12 ++++-------- Assets/Scripts/UI/UICameraSwitch.cs | 9 +++++++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Assets/Art/UIPrefab/UITipWindow.prefab b/Assets/Art/UIPrefab/UITipWindow.prefab index 2c15b99d..ada0c7aa 100644 --- a/Assets/Art/UIPrefab/UITipWindow.prefab +++ b/Assets/Art/UIPrefab/UITipWindow.prefab @@ -652,8 +652,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Padding: - m_Left: 0 - m_Right: 0 + m_Left: 20 + m_Right: 20 m_Top: 20 m_Bottom: 0 m_ChildAlignment: 1 diff --git a/Assets/Scripts/TimeScaleController.cs b/Assets/Scripts/TimeScaleController.cs index 346d9436..00b299e2 100644 --- a/Assets/Scripts/TimeScaleController.cs +++ b/Assets/Scripts/TimeScaleController.cs @@ -39,12 +39,12 @@ public class TimeScaleController : MonoBehaviour } if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) { - if (Input.GetKeyDown(KeyCode.Q)) + if (Input.GetKeyDown(KeyCode.C)) { string str = string.Empty; str = $"{gameObject.transform.position}|{gameObject.transform.eulerAngles}"; #if UNITY_WEBGL - Debug.Log("Ctrl + Q £"); + Debug.Log("Ctrl + Q £"+str); CopyToClipboard(str); #elif UNITY_STANDALONE_WIN && !UNITY_EDITOR // ʾ @@ -53,18 +53,14 @@ public class TimeScaleController : MonoBehaviour #endif } #if UNITY_STANDALONE_WIN &&!UNITY_EDITOR - if (Input.GetKeyDown(KeyCode.E)) + if (Input.GetKeyDown(KeyCode.V)) { string tmp = GUIUtility.systemCopyBuffer; - Debug.LogError("ǰ壺" + tmp); + Debug.Log("ǰ壺" + tmp); tmp = tmp.Replace("(", ""); - Debug.LogError(tmp); tmp = tmp.Replace(")", ""); - Debug.LogError(tmp); var datas = tmp.Split('|'); - Debug.LogError(datas[0]); - Debug.LogError(datas[1]); gameObject.transform.position = Utility.GetVector3FromStrArray(datas[0]); gameObject.transform.eulerAngles = Utility.GetVector3FromStrArray(datas[1]); } diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index e63756f0..89079724 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -21,6 +21,7 @@ namespace QFramework.Example } public partial class UICameraSwitch : UIPanel { + bool firstFreeMove = true; protected override void OnInit(IUIData uiData = null) { TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); @@ -114,6 +115,14 @@ namespace QFramework.Example { Near.isOn = false; Far.isOn = false; + if (firstFreeMove) + { + UITipWindowData data = new UITipWindowData(); + data.txt = "лƶӽǣ½ǰťɻصԤӽǡ"; + data.btns.Add(new UITipWindowData.ItemData() { txt = "ȷ" }); + UIKit.OpenPanelAsync(canvasLevel: UILevel.PopUI, uiData: data).ToAction().StartGlobal(); + firstFreeMove = false; + } } }