Merge branch 'master' into LouDi_Quan

This commit is contained in:
shenjianxing 2025-02-28 17:31:45 +08:00
commit 8d8d852026
3 changed files with 15 additions and 10 deletions

View File

@ -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

View File

@ -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]);
}

View File

@ -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<OnModuleQuit>((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<UITipWindow>(canvasLevel: UILevel.PopUI, uiData: data).ToAction().StartGlobal();
firstFreeMove = false;
}
}
}