From 2d3616b9ee444ce0af0aed483001bf7bc923a754 Mon Sep 17 00:00:00 2001 From: wsh Date: Thu, 22 May 2025 16:58:25 +0900 Subject: [PATCH] =?UTF-8?q?5.=20LoadLocalTextureDataCommand=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=206.=20LoadLocalModelDataCommand=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/SceneDataContainer.cs | 11 +++ Assets/SceneDataContainer.cs.meta | 2 + Assets/Scenes/pre-0.24.0.unity | 45 ++++++++++ .../Studio/AssetTool/CustomAssetConnector.cs | 49 +++++----- .../AssetTool/CustomAssetDataHandler.cs | 9 -- .../Studio/AssetTool/FBXFileManager.cs | 68 ++++++++++++-- .../Command/CreateConnectedAssetCommand.cs | 7 +- .../FileCommand/LoadLocalModelDataCommand.cs | 89 ------------------- .../LoadLocalModelDataCommand.cs.meta | 2 - .../LoadLocalTextureDataCommand.cs | 50 ----------- .../LoadLocalTextureDataCommand.cs.meta | 2 - .../RemoveSelectObjectCommand.cs | 9 +- Assets/Scripts/Studio/Core/CommandInvoker.cs | 2 + 13 files changed, 152 insertions(+), 193 deletions(-) create mode 100644 Assets/SceneDataContainer.cs create mode 100644 Assets/SceneDataContainer.cs.meta delete mode 100644 Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs delete mode 100644 Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs.meta delete mode 100644 Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs delete mode 100644 Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs.meta diff --git a/Assets/SceneDataContainer.cs b/Assets/SceneDataContainer.cs new file mode 100644 index 00000000..be3ba230 --- /dev/null +++ b/Assets/SceneDataContainer.cs @@ -0,0 +1,11 @@ +using Studio.AssetTool; +using System.Collections.Generic; +using UnityEngine; + +namespace XED +{ + public class SceneDataContainer : MonoBehaviour + { + public List sceneObjects = new(); + } +} diff --git a/Assets/SceneDataContainer.cs.meta b/Assets/SceneDataContainer.cs.meta new file mode 100644 index 00000000..26666158 --- /dev/null +++ b/Assets/SceneDataContainer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 89a58e6aed073fe4188a7bb3580d5e08 \ No newline at end of file diff --git a/Assets/Scenes/pre-0.24.0.unity b/Assets/Scenes/pre-0.24.0.unity index 9b666f96..7650f263 100644 --- a/Assets/Scenes/pre-0.24.0.unity +++ b/Assets/Scenes/pre-0.24.0.unity @@ -119,6 +119,50 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &1155209 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1155210} + - component: {fileID: 1155211} + m_Layer: 0 + m_Name: SceneDataContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1155210 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1155209} + 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 &1155211 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1155209} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 89a58e6aed073fe4188a7bb3580d5e08, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!224 &110380560 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 1112357447546033534, guid: 86fac645f610e6c43a57c53dec3f6e48, type: 3} @@ -2971,6 +3015,7 @@ Transform: - {fileID: 391151068} - {fileID: 294055731} - {fileID: 349372257} + - {fileID: 1155210} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1093055757 diff --git a/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs b/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs index 596d7c6d..03df882a 100644 --- a/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs +++ b/Assets/Scripts/Studio/AssetTool/CustomAssetConnector.cs @@ -12,6 +12,7 @@ using System; using Studio.Core; using System.Collections; using Studio.AssetLibraryTree; +using XED; namespace Studio.AssetTool { @@ -37,7 +38,7 @@ namespace Studio.AssetTool public CustomAssetDataHandler assetDataHandler; public CustomAssetEventHandler assetEventHandler; - + public SceneDataContainer sceneDataContainer; public CustomAssetConnector() { assetDataHandler = new CustomAssetDataHandler(); @@ -46,26 +47,25 @@ namespace Studio.AssetTool public override void Init() { //interferedObjectManager = ManagerHub.instance.Get(); + renderObjectPrefab = Resources.Load("Prefabs/PRF_RenderObject"); + + sceneDataContainer= GameObject.FindAnyObjectByType(); assetScrollRect = EventConnector.instance.GetCanvas().panel_assetlibrary.scrollRect; + assetScrollView = EventConnector.instance.GetCanvas().panel_assetlibrary.scrollView; + componentScrollView = EventConnector.instance.GetCanvas().panel_hierarchy.scrollView; + panel_ObjectDistance = EventConnector.instance.GetCanvas().panel_objectdistance; + InterworkingDataScrollView = EventConnector.instance.GetCanvas().panel_interworkingdatalist.scrollView; + assetScrollRect.onDragBegin.AddListener(OnAssetSelected); assetScrollRect.onDragAndDrop.AddListener(OnAssetDropped); - - InterworkingDataScrollView = EventConnector.instance.GetCanvas().panel_interworkingdatalist.scrollView; - InterworkingDataScrollView.onSelect.AddListener(assetEventHandler.OnSelectDataFromHierarchy); - - assetScrollView = EventConnector.instance.GetCanvas().panel_assetlibrary.scrollView; assetScrollView.onSelect.AddListener(assetEventHandler.OnSelectAssetFromHierarchy); - componentScrollView = EventConnector.instance.GetCanvas().panel_hierarchy.scrollView; - componentScrollView.onSelect.AddListener(assetEventHandler.OnSelectObjectFromHierarchy); componentScrollView.onParentChanged.AddListener(OnParentChanged); - - panel_ObjectDistance = EventConnector.instance.GetCanvas().panel_objectdistance; - - renderObjectPrefab = Resources.Load("Prefabs/PRF_RenderObject"); + componentScrollView.onSelect.AddListener(assetEventHandler.OnSelectObjectFromHierarchy); + + InterworkingDataScrollView.onSelect.AddListener(assetEventHandler.OnSelectDataFromHierarchy); } - IEnumerator ChangeSelectedAssetTransform() { while (selectedAssetData != null) @@ -112,7 +112,16 @@ namespace Studio.AssetTool bool isPointerOutScrollRect = !assetScrollRect.IsPointerOverScrollRect(); if (item != null && isPointerOutScrollRect) { - CreateConnectedAsset(); + ConnectedAsset connectedAsset = new ConnectedAsset + { + assetData = selectedAssetData, + hierarchyItem = componentScrollView.AddItem(selectedAssetData.assetName, selectedItem, HierarchyItemType.obj), + renderObject = selectRenderObject + }; + connectedAsset.renderObject.onTransformChanged = connectedAsset.assetData.OnTransformDataChanged; + sceneDataContainer.sceneObjects.Add(connectedAsset.renderObject); + var command = new CreateConnectedAssetCommand(connectedAsset); + CommandInvoker.instance.Invoke(command); } else { @@ -125,18 +134,6 @@ namespace Studio.AssetTool onAssetDropped?.Invoke(); } - void CreateConnectedAsset() - { - ConnectedAsset connectedAsset = new ConnectedAsset - { - assetData = selectedAssetData, - hierarchyItem = componentScrollView.AddItem(selectedAssetData.assetName, selectedItem, HierarchyItemType.obj), - renderObject = selectRenderObject - }; - connectedAsset.renderObject.onTransformChanged = connectedAsset.assetData.OnTransformDataChanged; - var command = new CreateConnectedAssetCommand(connectedAsset, this); - CommandInvoker.instance.Invoke(command); - } public void OnParentChanged(HierarchyItem parentItem, HierarchyItem childItem) { ConnectedAsset parentAsset = connectedAssets.Find((x) => x.hierarchyItem == parentItem); diff --git a/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs b/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs index 61b87031..d650fbe0 100644 --- a/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs +++ b/Assets/Scripts/Studio/AssetTool/CustomAssetDataHandler.cs @@ -8,15 +8,6 @@ namespace Studio.AssetTool { public class CustomAssetDataHandler { - public void OnLoadFbxFile(string objectName, string folderName, CustomAssetData assetData) - { - var connector = ManagerHub.instance.Get(); - AssetLibraryItem parent = connector.assetScrollView.FindItem(folderName, AssetLibraryItemType.folder) ?? connector.assetScrollView.AddItem(folderName, null, AssetLibraryItemType.folder); - AssetLibraryItem item = connector.assetScrollView.AddItem(objectName, assetData.gameObject, AssetLibraryItemType.file, parent); - assetData.onLoadProgress.RemoveAllListeners(); - assetData.onLoadProgress.AddListener((x) => item.onLoadProgress?.Invoke(x)); - } - public void OnRemoveFbxFile(string objectName) { var connector = ManagerHub.instance.Get(); diff --git a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs index d6e96581..ce543c6c 100644 --- a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs +++ b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs @@ -13,6 +13,7 @@ using Studio.AssetTool; using Ookii.Dialogs; using Studio.Command; using Studio.Manage; +using Studio.AssetLibraryTree; namespace Studio.AssetTool { @@ -25,7 +26,6 @@ namespace Studio.AssetTool public UnityEvent onRemoveFbxFile; public SaveData saveData; - private Queue loadFilePath = new Queue(); public SharedMaterial sharedMaterial; private MessagePackFileManager messagePacker; private bool isSaveTaskComplete = true; @@ -146,11 +146,69 @@ namespace Studio.AssetTool yield break; } - saveData = task.Result; - CommandInvoker.instance.Invoke(new LoadLocalTextureDataCommand()); - CommandInvoker.instance.Invoke(new LoadLocalModelDataCommand()); - + saveData = task.Result; + CoroutineRunner.instance.StartCoroutine(LoadDefaultModelDatas()); isLoadTaskComplete = true; } + + + IEnumerator LoadDefaultModelDatas() + { + foreach (var tex in saveData.textureDatas) + { + sharedMaterial.AddTextureData(tex); + + } + + for (int i = 0; i < saveData.modelDatas.Length; i++) + { + var modelData = saveData.modelDatas[i]; + string assetName = modelData.attributes.FirstOrDefault(x => x[0].Equals("assetName"))?[1]; + + if (dataRepo.TryGetDataFromName(assetName, out var p)) + continue; + LoadSaveData(saveData, i); + yield return null; + } + } + + void LoadSaveData(SaveData saveData, int index) + { + var modelData = saveData.modelDatas[index]; + string assetName = modelData.attributes.FirstOrDefault(x => x[0].Equals("assetName"))?[1]; + string folderName = modelData.attributes.FirstOrDefault(x => x[0].Equals("folderName"))?[1]; + string createDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("createDate"))?[1]; + string lastRevisionDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("lastRevisionDate"))?[1]; + string uploadDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("uploadDate"))?[1]; + string creator = modelData.attributes.FirstOrDefault(x => x[0].Equals("creator"))?[1]; + string manager = modelData.attributes.FirstOrDefault(x => x[0].Equals("manager"))?[1]; + + Texture2D thumbnail = new Texture2D(1, 1); + thumbnail.LoadImage(saveData.thumbnailDatas[index].data); + GameObject newObject = new GameObject(assetName); + newObject.transform.parent = fbxAnchor; + CustomAssetData assetData = newObject.AddComponent(); + assetData.assetName = assetName; + assetData.folderName = folderName; + assetData.createDate = createDate; + assetData.LastRevisionDate = lastRevisionDate; + assetData.UploadDate = uploadDate; + assetData.Creator = creator; + assetData.Manager = manager; + assetData.loadedObject = modelData.LoadModelData(sharedMaterial); + assetData.thumbnail = thumbnail; + assetData.OnLoadComplete(); + + dataRepo.Add(assetData); + //listAssets.Add(assetData); + var connector = ManagerHub.instance.Get(); + AssetLibraryItem parent = connector.assetScrollView.FindItem(folderName, AssetLibraryItemType.folder) ?? + connector.assetScrollView.AddItem(folderName, null, AssetLibraryItemType.folder); + + AssetLibraryItem item = connector.assetScrollView.AddItem(assetData.assetName, assetData.gameObject, AssetLibraryItemType.file, parent); + + assetData.onLoadProgress.RemoveAllListeners(); + assetData.onLoadProgress.AddListener((x) => item.onLoadProgress?.Invoke(x)); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Studio/Command/CreateConnectedAssetCommand.cs b/Assets/Scripts/Studio/Command/CreateConnectedAssetCommand.cs index df2c4d66..56ab7550 100644 --- a/Assets/Scripts/Studio/Command/CreateConnectedAssetCommand.cs +++ b/Assets/Scripts/Studio/Command/CreateConnectedAssetCommand.cs @@ -1,16 +1,15 @@ using Studio.AssetTool; +using Studio.Manage; namespace Studio.Command { public class CreateConnectedAssetCommand : IReversibleCommand { private ConnectedAsset connectedAsset; - private CustomAssetConnector connector; - public CreateConnectedAssetCommand(ConnectedAsset connectedAsset, CustomAssetConnector connector) + public CreateConnectedAssetCommand(ConnectedAsset connectedAsset) { this.connectedAsset = connectedAsset; - this.connector = connector; } public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); } @@ -21,6 +20,7 @@ namespace Studio.Command public void Execute() { + var connector = ManagerHub.instance.Get(); if (!connectedAsset.renderObject.gameObject.activeSelf) { connectedAsset.assetData.AddTransformToRender(connectedAsset.renderObject.transform); @@ -33,6 +33,7 @@ namespace Studio.Command public void Undo() { + var connector = ManagerHub.instance.Get(); connector.connectedAssets.Remove(connectedAsset); connectedAsset.assetData.RemoveTransform(connectedAsset.renderObject.transform); connectedAsset.renderObject.gameObject.SetActive(false); diff --git a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs b/Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs deleted file mode 100644 index f629b78d..00000000 --- a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections; -using System.Linq; -using UnityEngine; -using Studio.AssetTool; -using Studio.Manage; -using Studio.Repositories; -using Studio.Util; - -namespace Studio.Command -{ - public class LoadLocalModelDataCommand : IIrreversibleCommand - { - private FBXFileManager fbxFileManager; - private float loadTime = 0f; - - public LoadLocalModelDataCommand() - { - - } - - public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); } - - public bool CanExecute() - { - throw new System.NotImplementedException(); - } - - public void Execute() - { - fbxFileManager = ManagerHub.instance.Get(); - - for (int i = 0; i < fbxFileManager.saveData.modelDatas.Length; i++) - { - CoroutineRunner.instance.StartCoroutine(LoadModelData(i)); - } - } - - IEnumerator LoadModelData(int index) - { - if (!LoadSaveData(fbxFileManager.saveData, index)) - yield break; - - loadTime += Time.deltaTime; - if (loadTime > 1f / 30f) - { - loadTime = 0f; - yield return null; - } - } - - bool LoadSaveData(SaveData saveData, int index) - { - var modelData = saveData.modelDatas[index]; - string assetName = modelData.attributes.FirstOrDefault(x => x[0].Equals("assetName"))?[1]; - - if (fbxFileManager.dataRepo.TryGetDataFromName(assetName, out var p)) - return false; - - string folderName = modelData.attributes.FirstOrDefault(x => x[0].Equals("folderName"))?[1]; - string createDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("createDate"))?[1]; - string lastRevisionDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("lastRevisionDate"))?[1]; - string uploadDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("uploadDate"))?[1]; - string creator = modelData.attributes.FirstOrDefault(x => x[0].Equals("creator"))?[1]; - string manager = modelData.attributes.FirstOrDefault(x => x[0].Equals("manager"))?[1]; - - Texture2D thumbnail = new Texture2D(1, 1); - thumbnail.LoadImage(saveData.thumbnailDatas[index].data); - GameObject newObject = new GameObject(assetName); - newObject.transform.parent = fbxFileManager.fbxAnchor; - CustomAssetData assetData = newObject.AddComponent(); - assetData.assetName = assetName; - assetData.folderName = folderName; - assetData.createDate = createDate; - assetData.LastRevisionDate = lastRevisionDate; - assetData.UploadDate = uploadDate; - assetData.Creator = creator; - assetData.Manager = manager; - assetData.loadedObject = modelData.LoadModelData(fbxFileManager.sharedMaterial); - assetData.thumbnail = thumbnail; - assetData.OnLoadComplete(); - - fbxFileManager.dataRepo.Add(assetData); - //listAssets.Add(assetData); - ManagerHub.instance.Get().assetDataHandler.OnLoadFbxFile(assetData.assetName, assetData.folderName, assetData); - - return true; - } - } -} diff --git a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs.meta b/Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs.meta deleted file mode 100644 index 099bf9d8..00000000 --- a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalModelDataCommand.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 34c7091e151c4654f80f16448c43f36d \ No newline at end of file diff --git a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs b/Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs deleted file mode 100644 index 2aaee709..00000000 --- a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Collections; -using UnityEngine; -using Studio.Manage; -using Studio.AssetTool; - -namespace Studio.Command -{ - public class LoadLocalTextureDataCommand : IIrreversibleCommand - { - private FBXFileManager fbxFileManager; - private float loadTime = 0f; - - public LoadLocalTextureDataCommand() - { - - } - - public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); } - - public bool CanExecute() - { - throw new System.NotImplementedException(); - } - - public void Execute() - { - fbxFileManager = ManagerHub.instance.Get(); - - foreach (var tex in fbxFileManager.saveData.textureDatas) - { - CoroutineRunner.instance.StartCoroutine(LoadTextureData(tex)); - } - - } - - IEnumerator LoadTextureData(TextureData texData) - { - fbxFileManager.sharedMaterial.AddTextureData(texData); - - loadTime += Time.deltaTime; - if (loadTime > 1f / 30f) - { - loadTime = 0f; - yield return null; - } - - // yield return null; - } - } -} diff --git a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs.meta b/Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs.meta deleted file mode 100644 index 457925d2..00000000 --- a/Assets/Scripts/Studio/Command/FileCommand/LoadLocalTextureDataCommand.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 243104ea078b0364e811f6803ef3b3b2 \ No newline at end of file diff --git a/Assets/Scripts/Studio/Command/ObjectCommand/RemoveSelectObjectCommand.cs b/Assets/Scripts/Studio/Command/ObjectCommand/RemoveSelectObjectCommand.cs index 66efd3af..d68ccedd 100644 --- a/Assets/Scripts/Studio/Command/ObjectCommand/RemoveSelectObjectCommand.cs +++ b/Assets/Scripts/Studio/Command/ObjectCommand/RemoveSelectObjectCommand.cs @@ -10,12 +10,6 @@ namespace Studio.Command { private List removeList = new List(); private List siblingIndex = new List(); - private CustomAssetConnector connector; - - public RemoveSelectObjectCommand() - { - - } public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); } @@ -27,7 +21,7 @@ namespace Studio.Command public void Execute() { var renderObjectHandler = ManagerHub.instance.Get(); - connector = ManagerHub.instance.Get(); + var connector = ManagerHub.instance.Get(); if (renderObjectHandler.selectedRenderObjects.Count == 0) return; @@ -64,6 +58,7 @@ namespace Studio.Command public void Undo() { + var connector = ManagerHub.instance.Get(); for (int i = 0; i < removeList.Count; i++) { ConnectedAsset connectedAsset = removeList[i]; diff --git a/Assets/Scripts/Studio/Core/CommandInvoker.cs b/Assets/Scripts/Studio/Core/CommandInvoker.cs index 44786f6d..6bccec8f 100644 --- a/Assets/Scripts/Studio/Core/CommandInvoker.cs +++ b/Assets/Scripts/Studio/Core/CommandInvoker.cs @@ -15,6 +15,7 @@ namespace Studio.Command Stack undoableStack = new (); public void Invoke(IReversibleCommand command) { + Debug.Log($"Invoke Reversible Command={command}"); command.Execute(); commandStack.Push(command); undoableStack.Push(command); @@ -22,6 +23,7 @@ namespace Studio.Command public void Invoke(IIrreversibleCommand command) { + Debug.Log($"Invoke Irreversible Command={command}"); command.Execute(); commandStack.Push(command); }