diff --git a/Assets/Scenes/0.30.0.unity b/Assets/Scenes/0.30.0.unity index db8b50b5..696818d8 100644 --- a/Assets/Scenes/0.30.0.unity +++ b/Assets/Scenes/0.30.0.unity @@ -4647,6 +4647,7 @@ Transform: - {fileID: 349372257} - {fileID: 1155210} - {fileID: 571004139} + - {fileID: 1688408581} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1093055757 @@ -4661,6 +4662,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2778cc56cc78c8a46846112e3aad69d2, type: 3} m_Name: m_EditorClassIdentifier: + commandLocalizationHelper: {fileID: 0} --- !u!1001 &1099738087 PrefabInstance: m_ObjectHideFlags: 0 @@ -8859,6 +8861,66 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 1192815944285530361, guid: 72f142af384a5e341bf6099f889cca18, type: 3} m_PrefabInstance: {fileID: 1639318483} m_PrefabAsset: {fileID: 0} +--- !u!1 &1688408580 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1688408581} + - component: {fileID: 1688408582} + m_Layer: 0 + m_Name: CommandLocalizationHelper + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1688408581 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1688408580} + 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 &1688408582 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1688408580} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4bd9ae3f3097fe1469025dda7574bf9d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_StringReference: + m_TableReference: + m_TableCollectionName: + m_TableEntryReference: + m_KeyId: 0 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_FormatArguments: [] + m_UpdateString: + m_PersistentCalls: + m_Calls: [] + references: + version: 2 + RefIds: [] --- !u!1001 &1712022042 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Studio/Core/SystemMain.cs b/Assets/Scripts/Studio/Core/SystemMain.cs index ad5979ee..b082441e 100644 --- a/Assets/Scripts/Studio/Core/SystemMain.cs +++ b/Assets/Scripts/Studio/Core/SystemMain.cs @@ -18,7 +18,6 @@ namespace Studio.Core { commandLocalizationHelper = FindAnyObjectByType(); ManagerHub.instance.Init(); - CommandHub.instance.Init(); CanvasManager.instance.Init(); } } diff --git a/Assets/Scripts/Studio/Managers/CommandHub.cs b/Assets/Scripts/Studio/Managers/CommandHub.cs deleted file mode 100644 index 9899bdbd..00000000 --- a/Assets/Scripts/Studio/Managers/CommandHub.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Studio.AssetTool; -using Studio.Core; -using Studio.Manage; -using Studio.Services; -using System.Collections.Generic; -using System.Windows.Input; -using UnityEngine; -using XRLib.Collections; - -namespace Studio.Command -{ - public class CommandHub : UnitySingleton - { - public HashSet commands = new HashSet(); - - public void Init() - { - Join(new ActivateMoveGizmoCommand()); - Join(new ActivateRotateGizmoCommand()); - Join(new ActivateScaleGizmoCommand()); - Join(new ResetGizmoCommand()); - Join(new CopyObjectCommand()); - Join(new RemoveAllObjectCommand()); - Join(new RemoveSelectObjectCommand()); - Join(new NewProjectCommand()); - Join(new OpenProjectCommand()); - Join(new SaveAndNewProjectCommand()); - Join(new SaveAndOpenProjectCommand()); - Join(new SaveProjectCommand()); - Join(new TopMenuNewProjectCommand()); - Join(new TopMenuOpenProjectCommand()); - Join(new CreateConnectedAssetCommand()); - Join(new ExitProgramCommand()); - - } - - void Join(ICommand newCommand) - { - if (!commands.Add(newCommand)) - { - Debug.LogError($"Command {newCommand} already exists in the hub."); - } - } - - public T Get() where T : ICommand - { - foreach (var c in commands) - { - if (c is T command) - { - return command; - } - } - return default(T); - } - } -} diff --git a/Assets/Scripts/Studio/Managers/CommandHub.cs.meta b/Assets/Scripts/Studio/Managers/CommandHub.cs.meta deleted file mode 100644 index 0fbe9f00..00000000 --- a/Assets/Scripts/Studio/Managers/CommandHub.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 625661f14d5328e438380b4797ae4955 \ No newline at end of file diff --git a/Assets/Scripts/Studio/Managers/ManagerHub.cs b/Assets/Scripts/Studio/Managers/ManagerHub.cs index e8a0ee79..0b4db117 100644 --- a/Assets/Scripts/Studio/Managers/ManagerHub.cs +++ b/Assets/Scripts/Studio/Managers/ManagerHub.cs @@ -25,8 +25,8 @@ namespace Studio.Manage Join(new SceneStartSettingManager()); Join(new RunManager()); Join(new ProjectDataComparerManager()); - Join(new SearchManager()); Join(new LanguageManager()); + Join(new SearchManager()); foreach(var m in managers) { m.Init();