From 70eddeb8816c5304f6f9c256551649f4ad6b005b Mon Sep 17 00:00:00 2001 From: TRAfoer Date: Sat, 22 Feb 2025 00:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/EditorScene.unity | 35 +++++++++---------------- Assets/Scripts/Console/EditorConsole.cs | 9 ++++--- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/Assets/Scenes/EditorScene.unity b/Assets/Scenes/EditorScene.unity index 617e0f3f..e1f18fb2 100644 --- a/Assets/Scenes/EditorScene.unity +++ b/Assets/Scenes/EditorScene.unity @@ -421,13 +421,13 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 18 + m_fontSize: 9.75 m_fontSizeBase: 14 m_fontWeight: 400 m_enableAutoSizing: 1 - m_fontSizeMin: 18 + m_fontSizeMin: 0 m_fontSizeMax: 72 - m_fontStyle: 2 + m_fontStyle: 0 m_HorizontalAlignment: 1 m_VerticalAlignment: 256 m_textAlignment: 65535 @@ -2361,9 +2361,9 @@ MonoBehaviour: m_fontSizeBase: 14 m_fontWeight: 400 m_enableAutoSizing: 1 - m_fontSizeMin: 18 + m_fontSizeMin: 0 m_fontSizeMax: 72 - m_fontStyle: 2 + m_fontStyle: 0 m_HorizontalAlignment: 1 m_VerticalAlignment: 256 m_textAlignment: 65535 @@ -4402,8 +4402,9 @@ MonoBehaviour: - {fileID: 101130667} InputCommand: {fileID: 1279518170} ConsoleUI: {fileID: 1174452737} - hierarchy: {fileID: 1648907612} inspector: {fileID: 1295357895} + hierarchy: {fileID: 1648907612} + logWindow: {fileID: 0} --- !u!114 &1197505582 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4758,10 +4759,10 @@ RectTransform: - {fileID: 227945216} m_Father: {fileID: 1174452738} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 201} - m_SizeDelta: {x: 450, y: 15} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -56.44951} + m_SizeDelta: {x: 450, y: 23.898987} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1279518170 MonoBehaviour: @@ -4824,19 +4825,7 @@ MonoBehaviour: m_CharacterLimit: 0 m_OnEndEdit: m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1197505581} - m_TargetAssemblyTypeName: Ichni.Editor.EditorConsole, Assembly-CSharp - m_MethodName: GetCommand - m_Mode: 0 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 + m_Calls: [] m_OnSubmit: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Scripts/Console/EditorConsole.cs b/Assets/Scripts/Console/EditorConsole.cs index 20688df7..9c799c91 100644 --- a/Assets/Scripts/Console/EditorConsole.cs +++ b/Assets/Scripts/Console/EditorConsole.cs @@ -68,7 +68,7 @@ namespace Ichni.Editor ConsoleUI.SetActive(isHide); isHide = !isHide; - if (isHide) StartCoroutine(WindowAnim.ShowPanel(InputCommand.gameObject)); + if (!isHide) StartCoroutine(WindowAnim.ShowPanel(InputCommand.gameObject)); } if (Keyboard.current.leftCtrlKey.isPressed && Keyboard.current.upArrowKey.wasPressedThisFrame) { @@ -163,7 +163,7 @@ namespace Ichni.Editor functionInterpreter = new Interpreter(); functionInterpreter.SetFunction("test", (Action)Test); - functionInterpreter.SetFunction("Kill", (Action)Kill); + functionInterpreter.SetFunction("kill", (Action)Kill); functionInterpreter.SetFunction("lgp", (Action)LGenPathNodes); functionInterpreter.SetFunction("print", (Action)print); functionInterpreter.SetFunction("log", (Action)Debug.Log); @@ -181,7 +181,10 @@ namespace Ichni.Editor } for (int i = inspector.connectedGameElement.childElementList.Count - 1; i <= 0; i--) { - inspector.connectedGameElement.childElementList[i].Delete(); + EditorManager.instance.operationManager.CopyPasteDeleteModule.DeleteElement( + inspector.connectedGameElement.childElementList[i] + ); + inspector.connectedGameElement.childElementList.RemoveAt(i); } } private void Test()