From 514d9f29379a426ec1cd60a2ff788f54ca4502ac Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 8 Apr 2025 11:40:28 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EB=B0=B1=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetTool/CustomAssetDataHandler.cs | 2 +- .../Studio/AssetTool/FBXFileManager.cs | 16 ++++++---------- .../Studio/Managers/CoroutineRunner.cs | 19 +++++++++++++++++++ .../Studio/Managers/CoroutineRunner.cs.meta | 2 ++ .../Managers/InterferedObjectManager.cs | 1 + .../Studio/Managers/StaticCanvasHandler.cs | 1 + .../Scripts/Studio/UI/Canvas/Canvas_Popup.cs | 4 ++-- .../Studio/UI/TreeView/PooledScrollView.cs | 2 ++ 8 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 Assets/Scripts/Studio/Managers/CoroutineRunner.cs create mode 100644 Assets/Scripts/Studio/Managers/CoroutineRunner.cs.meta diff --git a/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs b/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs index 52955769..ff43eb75 100644 --- a/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs +++ b/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs @@ -32,7 +32,7 @@ namespace XED public void LoadLocalAssetDatas() { var fbxFileManager = ManagerHub.instance.Get(); - fbxFileManager.LoadLocalData(); + // fbxFileManager.LoadLocalData(); } } } \ No newline at end of file diff --git a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs index 265d3cb8..73163141 100644 --- a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs +++ b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs @@ -20,7 +20,6 @@ namespace XED.Manage public string identifier; public string password; public UnityEvent onRemoveFbxFile; - public event System.Action onBeginLoadAsset; private SaveData saveData; private Queue loadFilePath = new Queue(); @@ -39,15 +38,10 @@ namespace XED.Manage messagePacker.Initialize(); identifier = string.IsNullOrEmpty(identifier) ? "defaultAssetData" : identifier; - //StartCoroutine(CoroutineLoadLocalFiles()); - string baseDataPath = Application.streamingAssetsPath + "/baseAssetData"; - LoadLocalData(baseDataPath); } public override void Init() { - var canvas_Popup = EventConnector.instance.GetCanvas(); - GameObject assetWindow = canvas_Popup.panel_assetlibrary.gameObject; - onBeginLoadAsset += (() => assetWindow.SetActive(true)); + } public void LoadLocalFBXDirectory() @@ -84,14 +78,16 @@ namespace XED.Manage } //StartCoroutine(CoroutineSaveToLocalData(assetDatas, path)); } - public void LoadLocalData(string path = "") + public void LoadLocalData() { + Debug.Log("isLoadTaskComplete " + isLoadTaskComplete); if (isLoadTaskComplete == false) { return; } - onBeginLoadAsset?.Invoke(); - //StartCoroutine(CoroutineLoadFromLocalData(path)); + + string path = Application.streamingAssetsPath + "/baseAssetData"; + CoroutineRunner.instance.StartCoroutine(CoroutineLoadFromLocalData(path)); } public CustomAssetData GetCustomAssetData(string name) diff --git a/Assets/Scripts/Studio/Managers/CoroutineRunner.cs b/Assets/Scripts/Studio/Managers/CoroutineRunner.cs new file mode 100644 index 00000000..ddd53af6 --- /dev/null +++ b/Assets/Scripts/Studio/Managers/CoroutineRunner.cs @@ -0,0 +1,19 @@ +using System.Collections; +using UnityEngine; +using XED.Core; + +namespace XED +{ + public class CoroutineRunner : UnitySingleton + { + public new Coroutine StartCoroutine(IEnumerator coroutine) + { + return StartCoroutine(coroutine); + } + + public new void StopCoroutine(Coroutine coroutine) + { + StopCoroutine(coroutine); + } + } +} diff --git a/Assets/Scripts/Studio/Managers/CoroutineRunner.cs.meta b/Assets/Scripts/Studio/Managers/CoroutineRunner.cs.meta new file mode 100644 index 00000000..de12da4d --- /dev/null +++ b/Assets/Scripts/Studio/Managers/CoroutineRunner.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 55535e3d1a759a84e8d5bf93efe35f63 \ No newline at end of file diff --git a/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs b/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs index 5332da73..2e7d96d8 100644 --- a/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs +++ b/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs @@ -16,6 +16,7 @@ namespace XED public void AddInterferedPair(TwinObject obj1, TwinObject obj2) { + Debug.Log("enter"); var pair = obj1.GetInstanceID() < obj2.GetInstanceID() ? (obj1, obj2) : (obj2, obj1); if (interferedPairs.Contains(pair)) diff --git a/Assets/Scripts/Studio/Managers/StaticCanvasHandler.cs b/Assets/Scripts/Studio/Managers/StaticCanvasHandler.cs index 910e8f4d..f376a879 100644 --- a/Assets/Scripts/Studio/Managers/StaticCanvasHandler.cs +++ b/Assets/Scripts/Studio/Managers/StaticCanvasHandler.cs @@ -28,6 +28,7 @@ namespace XED.Manage canvas_static.panel_topbar.onClickLoadProject += projectManager.LoadProject; canvas_static.panel_topbar.onClickNewProject += projectManager.NewProject; canvas_static.panel_topbar.onClickLoadAssets += fbxFileManager.LoadLocalFBXDirectory; + canvas_static.panel_topbar.onClickAssetWindow += fbxFileManager.LoadLocalData; canvas_static.panel_topbar.onClickAssetWindow += (() => assetWindow.SetActive(!assetWindow.activeSelf)); canvas_static.panel_topbar.onClickComponentWindow += (() => componentWindow.SetActive(!componentWindow.activeSelf)); canvas_static.panel_topbar.onClickInterferedListWindow += (() => interferedobjectlistWindow.SetActive(!interferedobjectlistWindow.activeSelf)); diff --git a/Assets/Scripts/Studio/UI/Canvas/Canvas_Popup.cs b/Assets/Scripts/Studio/UI/Canvas/Canvas_Popup.cs index a8b81fea..0f91dc23 100644 --- a/Assets/Scripts/Studio/UI/Canvas/Canvas_Popup.cs +++ b/Assets/Scripts/Studio/UI/Canvas/Canvas_Popup.cs @@ -24,18 +24,18 @@ namespace XED public AGVNodeModePopup agvnodemodepopup; public Panel_Tooltip panel_tooltip; public Panel_PropertyViewer panel_propertyviewer; - public Panel_DragHandler panel_draghandler; + //public Panel_DragHandler panel_draghandler; public Panel_AssetEdit panel_assetedit; public Panel_Thumbnail panel_thumbnail; public Panel_ObjectDistance panel_objectdistance; void Awake() { - canvasHandler = new PopupCanvasHandler(this); } public override void AfterAwake() { + canvasHandler = new PopupCanvasHandler(this); GetComponent().sortingOrder = 1; foreach (var panel in GetComponentsInChildren(true)) diff --git a/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs b/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs index a65d9614..9b23c89f 100644 --- a/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs +++ b/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs @@ -79,6 +79,7 @@ namespace XED.HierarchyTree } public HierarchyItem AddItem(string name, GameObject linkedObject, HierarchyItemType type, HierarchyItem parent = null) { + Debug.Log("AddItem"); HierarchyItem tempItem = new HierarchyItem(name); tempItem.linkedObject = linkedObject; tempItem.type = type; @@ -96,6 +97,7 @@ namespace XED.HierarchyTree } public void AddItem(HierarchyItem item) { + Debug.Log("AddItem"); root.AddChild(item); ResetData(); } -- 2.48.1.windows.1 From d5ea8b03c5687af8d73f815b24f1fae9992d0e4c Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:50:28 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EA=B0=9D=EC=B2=B4=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=A0=95=EC=83=81=EB=8F=99?= =?UTF-8?q?=EC=9E=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 객체 아이템 로드 수정 2. drag&drop 수정 --- .../Scripts/Studio/AssetTool/CustomAssetConnector.cs | 11 ++++++++--- Assets/Scripts/Studio/AssetTool/FBXFileManager.cs | 1 - .../Studio/Managers/InterferedObjectManager.cs | 12 ++++++++---- Assets/Scripts/Studio/Managers/ManagerHub.cs | 2 +- .../Scripts/Studio/UI/TreeView/PooledScrollView.cs | 2 -- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs b/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs index 1b9c4ae8..533bc14b 100644 --- a/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs +++ b/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs @@ -10,6 +10,7 @@ using System.Linq; using UnityEditor; using System; using XED.Core; +using System.Collections; namespace XED.Asset { @@ -43,6 +44,7 @@ namespace XED.Asset } public override void Init() { + interferedObjectManager = ManagerHub.instance.Get(); assetScrollRect = EventConnector.instance.GetCanvas().panel_assetlibrary.scrollRect; assetScrollRect.onDragBegin.AddListener(OnAssetSelected); assetScrollRect.onDragAndDrop.AddListener(OnAssetDropped); @@ -57,6 +59,8 @@ namespace XED.Asset componentScrollView.onSelect.AddListener(assetEventHandler.OnSelectObjectFromHierarchy); componentScrollView.onParentChanged.AddListener(OnParentChanged); + panel_ObjectDistance = EventConnector.instance.GetCanvas().panel_objectdistance; + renderObjectPrefab = Resources.Load("Prefabs/PRF_RenderObject"); } @@ -99,10 +103,9 @@ namespace XED.Asset CommandInvoker.instance.Invoke(command); } - // Update is called once per frame - void Update() + IEnumerator ChangeSelectedAssetTransform() { - if (selectedAssetData != null) + while (selectedAssetData != null) { Vector3? pos = GetMousePointOnYPlane(objectShowDistance); if (pos.HasValue) @@ -110,6 +113,7 @@ namespace XED.Asset selectedItem.transform.position = pos.Value; selectedAssetData.OnTransformDataChanged(); } + yield return null; } } @@ -136,6 +140,7 @@ namespace XED.Asset selectRenderObject.CreateRenderObject(); selectRenderObject.Select(); selectedAssetData.AddTransformToRender(selectedItem.transform); + CoroutineRunner.instance.StartCoroutine(ChangeSelectedAssetTransform()); } public void OnAssetDropped(HierarchyItem item) { diff --git a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs index 73163141..ae944264 100644 --- a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs +++ b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs @@ -80,7 +80,6 @@ namespace XED.Manage } public void LoadLocalData() { - Debug.Log("isLoadTaskComplete " + isLoadTaskComplete); if (isLoadTaskComplete == false) { return; diff --git a/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs b/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs index 2e7d96d8..def1f0af 100644 --- a/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs +++ b/Assets/Scripts/Studio/Managers/InterferedObjectManager.cs @@ -5,24 +5,28 @@ using UnityEngine; using XED.Util; using XRLib; -namespace XED +namespace XED.Manage { - public class InterferedObjectManager : MonoBehaviour, ISingle + public class InterferedObjectManager : Manager { HashSet<(TwinObject, TwinObject)> interferedPairs = new(); public event Action<(TwinObject, TwinObject)> OnAddInterferedPair; public event Action<(TwinObject, TwinObject)> OnRemoveInterferedPair; + public override void Init() + { + + } + public void AddInterferedPair(TwinObject obj1, TwinObject obj2) { - Debug.Log("enter"); var pair = obj1.GetInstanceID() < obj2.GetInstanceID() ? (obj1, obj2) : (obj2, obj1); if (interferedPairs.Contains(pair)) return; - interferedPairs.Add(pair); + interferedPairs.Add(pair); OnAddInterferedPair?.Invoke(pair); } diff --git a/Assets/Scripts/Studio/Managers/ManagerHub.cs b/Assets/Scripts/Studio/Managers/ManagerHub.cs index 35856cb4..0c50ce8e 100644 --- a/Assets/Scripts/Studio/Managers/ManagerHub.cs +++ b/Assets/Scripts/Studio/Managers/ManagerHub.cs @@ -17,7 +17,7 @@ namespace XED.Manage Join(new UserInputManager()); Join(new CustomAssetConnector()); Join(new RenderObjectHandler()); - + Join(new InterferedObjectManager()); foreach(var m in managers) { diff --git a/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs b/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs index 9b23c89f..a65d9614 100644 --- a/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs +++ b/Assets/Scripts/Studio/UI/TreeView/PooledScrollView.cs @@ -79,7 +79,6 @@ namespace XED.HierarchyTree } public HierarchyItem AddItem(string name, GameObject linkedObject, HierarchyItemType type, HierarchyItem parent = null) { - Debug.Log("AddItem"); HierarchyItem tempItem = new HierarchyItem(name); tempItem.linkedObject = linkedObject; tempItem.type = type; @@ -97,7 +96,6 @@ namespace XED.HierarchyTree } public void AddItem(HierarchyItem item) { - Debug.Log("AddItem"); root.AddChild(item); ResetData(); } -- 2.48.1.windows.1 From 57fa1f08b60eda7a119d8a4521f05fc19c2922b6 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 8 Apr 2025 17:34:30 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EB=A7=88=EC=9A=B0=EC=8A=A4=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=82=B4=EB=A6=AC?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Studio/Managers/EventConnector.cs | 8 +- .../Studio/Managers/UserInputManager.cs | 77 +++++++++++-------- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/Assets/Scripts/Studio/Managers/EventConnector.cs b/Assets/Scripts/Studio/Managers/EventConnector.cs index 30c75811..c7b5023e 100644 --- a/Assets/Scripts/Studio/Managers/EventConnector.cs +++ b/Assets/Scripts/Studio/Managers/EventConnector.cs @@ -58,10 +58,10 @@ namespace XED.Manage canvas_Popup.panel_objectinfo.onTransformChanged += renderObjectHandler.OnTransformChanged; canvas_DragArea.panel_draghandler.onDragBoxSelect += customAssetConnector.assetEventHandler.OnDragBoxSelect; - //statusPanel.AddController(renderObjectHandler); - //statusPanel.AddController(wallBuilder); - //statusPanel.AddModeEnterEvent(ModePanel.ProgramMode.AGVPathDrawing, canvas_Popup.agvnodemodepopup.Open); - //statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout); + statusPanel.AddController(renderObjectHandler); + statusPanel.AddController(wallBuilder); + statusPanel.AddModeEnterEvent(ModePanel.ProgramMode.AGVPathDrawing, canvas_Popup.agvnodemodepopup.Open); + statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout); var commandHandler = CommandInvoker.instance.GetInputHandler(); userInputManager.SetHandler(GetDefaultInputHandler()); userInputManager.SetHandler(commandHandler); diff --git a/Assets/Scripts/Studio/Managers/UserInputManager.cs b/Assets/Scripts/Studio/Managers/UserInputManager.cs index 34059167..e7998038 100644 --- a/Assets/Scripts/Studio/Managers/UserInputManager.cs +++ b/Assets/Scripts/Studio/Managers/UserInputManager.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using UnityEngine; using XRLib; @@ -103,55 +104,63 @@ namespace XED.Manage } updateLoop += handler.updateLoop; } - void Update() + IEnumerator UpdateCoroutine() { - - foreach (var key in downKeyActionTable.Keys) + while (true) { - if (Input.GetKeyDown(key)) + foreach (var key in downKeyActionTable.Keys) { - downKeyActionTable[key]?.Invoke(); - } - } - - foreach (var key in getKeyActionTable.Keys) - { - if (Input.GetKey(key)) - { - getKeyActionTable[key]?.Invoke(); - } - } - - foreach (var key in upKeyActionTable.Keys) - { - if (Input.GetKeyUp(key)) - { - upKeyActionTable[key]?.Invoke(); - } - } - - foreach (var key in shortCutActionTable.Keys) - { - if (Input.GetKey(key)) - { - if (shortCutActionTable.TryGetValue(key, out var kk)) + if (Input.GetKeyDown(key)) { - foreach (var k in kk) + Debug.Log("1"); + downKeyActionTable[key]?.Invoke(); + } + } + + foreach (var key in getKeyActionTable.Keys) + { + if (Input.GetKey(key)) + { + Debug.Log("2"); + getKeyActionTable[key]?.Invoke(); + } + } + + foreach (var key in upKeyActionTable.Keys) + { + if (Input.GetKeyUp(key)) + { + Debug.Log("3"); + upKeyActionTable[key]?.Invoke(); + } + } + + foreach (var key in shortCutActionTable.Keys) + { + if (Input.GetKey(key)) + { + Debug.Log("4"); + if (shortCutActionTable.TryGetValue(key, out var kk)) { - if (Input.GetKeyDown(k.Key)) + foreach (var k in kk) { - k.Value?.Invoke(); + if (Input.GetKeyDown(k.Key)) + { + k.Value?.Invoke(); + } } } } } - } - updateLoop?.Invoke(); + updateLoop?.Invoke(); + yield return null; + } } public override void Init() { + CoroutineRunner.instance.StartCoroutine(UpdateCoroutine()); } } } -- 2.48.1.windows.1 From bc48d7e7e192c32888b5cc495f8b179ca3f18458 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Wed, 9 Apr 2025 09:10:58 +0900 Subject: [PATCH 4/5] =?UTF-8?q?UserInputManager=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Studio/Managers/UpdateRunner.cs | 37 ++++++++++++ .../Studio/Managers/UpdateRunner.cs.meta | 2 + .../Studio/Managers/UserInputManager.cs | 58 ++++++++----------- 3 files changed, 64 insertions(+), 33 deletions(-) create mode 100644 Assets/Scripts/Studio/Managers/UpdateRunner.cs create mode 100644 Assets/Scripts/Studio/Managers/UpdateRunner.cs.meta diff --git a/Assets/Scripts/Studio/Managers/UpdateRunner.cs b/Assets/Scripts/Studio/Managers/UpdateRunner.cs new file mode 100644 index 00000000..10e0c1c9 --- /dev/null +++ b/Assets/Scripts/Studio/Managers/UpdateRunner.cs @@ -0,0 +1,37 @@ +using NUnit.Framework; +using System; +using System.Collections.Generic; +using UnityEngine; +using XED.Core; + +namespace XED +{ + public class UpdateRunner : UnitySingleton + { + private static List updateActions = new List(); + + public static void AddAction(Action action) + { + if (!updateActions.Contains(action)) + { + updateActions.Add(action); + } + } + + public static void RemoveAction(Action action) + { + if (updateActions.Contains(action)) + { + updateActions.Remove(action); + } + } + + void Update() + { + foreach (Action action in updateActions) + { + action?.Invoke(); + } + } + } +} diff --git a/Assets/Scripts/Studio/Managers/UpdateRunner.cs.meta b/Assets/Scripts/Studio/Managers/UpdateRunner.cs.meta new file mode 100644 index 00000000..1ac3dffe --- /dev/null +++ b/Assets/Scripts/Studio/Managers/UpdateRunner.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 40294507f68cc2942b2bef179e37eb08 \ No newline at end of file diff --git a/Assets/Scripts/Studio/Managers/UserInputManager.cs b/Assets/Scripts/Studio/Managers/UserInputManager.cs index e7998038..b5e19cda 100644 --- a/Assets/Scripts/Studio/Managers/UserInputManager.cs +++ b/Assets/Scripts/Studio/Managers/UserInputManager.cs @@ -104,63 +104,55 @@ namespace XED.Manage } updateLoop += handler.updateLoop; } - IEnumerator UpdateCoroutine() + void Update() { - while (true) + foreach (var key in downKeyActionTable.Keys) { - foreach (var key in downKeyActionTable.Keys) + if (Input.GetKeyDown(key)) { - if (Input.GetKeyDown(key)) - { - Debug.Log("1"); - downKeyActionTable[key]?.Invoke(); - } + downKeyActionTable[key]?.Invoke(); } + } - foreach (var key in getKeyActionTable.Keys) + foreach (var key in getKeyActionTable.Keys) + { + if (Input.GetKey(key)) { - if (Input.GetKey(key)) - { - Debug.Log("2"); - getKeyActionTable[key]?.Invoke(); - } + getKeyActionTable[key]?.Invoke(); } + } - foreach (var key in upKeyActionTable.Keys) + foreach (var key in upKeyActionTable.Keys) + { + if (Input.GetKeyUp(key)) { - if (Input.GetKeyUp(key)) - { - Debug.Log("3"); - upKeyActionTable[key]?.Invoke(); - } + upKeyActionTable[key]?.Invoke(); } + } - foreach (var key in shortCutActionTable.Keys) + foreach (var key in shortCutActionTable.Keys) + { + if (Input.GetKey(key)) { - if (Input.GetKey(key)) + if (shortCutActionTable.TryGetValue(key, out var kk)) { - Debug.Log("4"); - if (shortCutActionTable.TryGetValue(key, out var kk)) + foreach (var k in kk) { - foreach (var k in kk) + if (Input.GetKeyDown(k.Key)) { - if (Input.GetKeyDown(k.Key)) - { - k.Value?.Invoke(); - } + k.Value?.Invoke(); } } } } - - updateLoop?.Invoke(); - yield return null; } + + updateLoop?.Invoke(); } public override void Init() { - CoroutineRunner.instance.StartCoroutine(UpdateCoroutine()); + UpdateRunner.AddAction(Update); } } } -- 2.48.1.windows.1 From 92e3b0ce9ae76c1af4fce670fee6c3befa0b581b Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Wed, 9 Apr 2025 09:28:10 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EC=94=AC=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/0.22.7.unity | 46 +++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/Assets/Scenes/0.22.7.unity b/Assets/Scenes/0.22.7.unity index 14b16985..f53743b9 100644 --- a/Assets/Scenes/0.22.7.unity +++ b/Assets/Scenes/0.22.7.unity @@ -2525,7 +2525,6 @@ MonoBehaviour: agvnodemodepopup: {fileID: 0} panel_tooltip: {fileID: 0} panel_propertyviewer: {fileID: 0} - panel_draghandler: {fileID: 0} panel_assetedit: {fileID: 0} panel_thumbnail: {fileID: 0} panel_objectdistance: {fileID: 0} @@ -4340,6 +4339,7 @@ Transform: - {fileID: 1801579273} - {fileID: 183140328} - {fileID: 749092880} + - {fileID: 1683270824} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1093055757 @@ -9933,6 +9933,50 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1656807015} m_CullTransparentMesh: 0 +--- !u!1 &1683270823 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1683270824} + - component: {fileID: 1683270825} + m_Layer: 0 + m_Name: UpdateRunner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1683270824 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1683270823} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1093055756} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1683270825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1683270823} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 40294507f68cc2942b2bef179e37eb08, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1688921138 GameObject: m_ObjectHideFlags: 0 -- 2.48.1.windows.1