From 647b4d089976bbd657a34c34c9430f8527b329f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=98=81=EB=AF=BC?= <117150306+jym04@users.noreply.github.com> Date: Tue, 10 Feb 2026 18:25:06 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=A0=95=EC=98=81=EB=AF=BC]=20=EC=84=A4?= =?UTF-8?q?=EB=B9=84=20=EC=95=84=EC=9D=B4=EC=BD=98=20=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94=20=EC=98=A4=EB=A5=98=20=EB=B0=8F=20=EC=B9=B4=EB=A9=94?= =?UTF-8?q?=EB=9D=BC=20=EC=9C=84=EC=B9=98=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 26.02.10 - 설비 아이콘 활성화 - 카메라 위치 오류 수정 --- .../Prefabs/UI/Window/PropertyWindow.prefab | 8 +-- Assets/Scenes/SystemScene.unity | 28 ++-------- .../Scripts/ChunilENG/ChunilENGSceneMain.cs | 11 ++++ Assets/Scripts/ChunilENG/UI/LeftSidePanel.cs | 53 ++++++------------- .../Command/UICommand/OpenHomePanelCommand.cs | 2 +- Assets/Scripts/KEPCO/UI/LeftSidePanel.cs | 41 ++++++++------ Assets/Scripts/KEPCO/UI/TopMenuPanel.cs | 5 -- 7 files changed, 61 insertions(+), 87 deletions(-) diff --git a/Assets/DownloadAssets/XRLib/Resources/Prefabs/UI/Window/PropertyWindow.prefab b/Assets/DownloadAssets/XRLib/Resources/Prefabs/UI/Window/PropertyWindow.prefab index a88a18d0..0f6ad14c 100644 --- a/Assets/DownloadAssets/XRLib/Resources/Prefabs/UI/Window/PropertyWindow.prefab +++ b/Assets/DownloadAssets/XRLib/Resources/Prefabs/UI/Window/PropertyWindow.prefab @@ -711,7 +711,7 @@ MonoBehaviour: m_HandleRect: {fileID: 0} m_Direction: 0 m_Value: 1 - m_Size: 0.9997558 + m_Size: 0.9999941 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -1349,8 +1349,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0.000015258789} - m_SizeDelta: {x: 0, y: -0.17746803} + m_AnchoredPosition: {x: 0, y: -0.00012207031} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &4790256706883938101 MonoBehaviour: @@ -1385,7 +1385,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6982330689999531319} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} m_Name: diff --git a/Assets/Scenes/SystemScene.unity b/Assets/Scenes/SystemScene.unity index ef044869..4a4e3c65 100644 --- a/Assets/Scenes/SystemScene.unity +++ b/Assets/Scenes/SystemScene.unity @@ -630,26 +630,18 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 1205322734457541541, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0.00012207031 - objectReference: {fileID: 0} - - target: {fileID: 1554032197748324192, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - target: {fileID: 1602519165350808158, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} propertyPath: m_Name value: PropertyWindow objectReference: {fileID: 0} - - target: {fileID: 4790256706883938101, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} - propertyPath: m_ChildControlWidth - value: 1 - objectReference: {fileID: 0} - target: {fileID: 7125265927081152491, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 7930097770660311367, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} + propertyPath: m_Size + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8065352563668446013, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} propertyPath: m_Pivot.x value: 1 @@ -730,18 +722,6 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 8946140259888033016, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8946140259888033016, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8946140259888033016, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Scripts/ChunilENG/ChunilENGSceneMain.cs b/Assets/Scripts/ChunilENG/ChunilENGSceneMain.cs index 9b8e5782..b9c01cf4 100644 --- a/Assets/Scripts/ChunilENG/ChunilENGSceneMain.cs +++ b/Assets/Scripts/ChunilENG/ChunilENGSceneMain.cs @@ -35,6 +35,7 @@ namespace ChunilENG public void InitSceneMain() { Debug.Log("ChunilENGSceneMain: InitSceneMain called."); + BaseCameraPoistion(); OnAppInitialized(); } @@ -63,6 +64,16 @@ namespace ChunilENG await UniTask.CompletedTask; } + private void BaseCameraPoistion() + { + var controller = OctopusTwinAppMain.Instance.cameraController; + + controller.currentAzimuth = 305f; + controller.currentElevation = 23f; + controller.currentDistance = 10f; + controller.SetTargetPos(new Vector3(17f, 0.05f, -2.806954f)); + } + //실제 데이터 받을 시 코드 변경 예정 private void SetupDataSetting() { diff --git a/Assets/Scripts/ChunilENG/UI/LeftSidePanel.cs b/Assets/Scripts/ChunilENG/UI/LeftSidePanel.cs index 6bf089f0..c47fd320 100644 --- a/Assets/Scripts/ChunilENG/UI/LeftSidePanel.cs +++ b/Assets/Scripts/ChunilENG/UI/LeftSidePanel.cs @@ -6,6 +6,7 @@ using OCTOPUS_TWIN.Command; using OCTOPUS_TWIN.Management; using OCTOPUS_TWIN.UI; using UnityEngine; +using UVC.UI.Commands; using UVC.UI.Toolbar; using UVC.UI.Toolbar.Model; @@ -42,46 +43,26 @@ namespace ChunilENG.UI "Prefabs/UI/Toolbar/images/ic_camera_top_on", "Prefabs/UI/Toolbar/images/ic_camera_top_off", (isSelected) => - { - //if (isSelected) - //{ - // var building = ChunilENGSceneMain.Instance.building; - // if(building != null) - // { - // foreach(var machine in building.GetMachines()) - // { - // machine.ReleaseAnimators(); - // } - // } - //} - }, - new CameraViewModeChangedCommand(ViewMode.TopView), + { + if (isSelected) + { + var controller = OctopusTwinAppMain.Instance.cameraController; + controller.SetViewMode(ViewMode.TopView); + } + },null, "Top View 시점으로 변경합니다."); toolbarModel.AddRadioButton("CameraControlGroup", "Quarter View", true, "Prefabs/UI/Toolbar/images/ic_camera_quarter_on", "Prefabs/UI/Toolbar/images/ic_camera_quarter_off", (isSelected) => - { - //if (isSelected) - //{ - // var building = ChunilENGSceneMain.Instance.building; - // if (building == null) return; - - // var currentFloorIndex = building.GetCurFloor().index; - // foreach (var machine in building.GetMachines()) - // { - // if (machine.GetMachineFloorIndex() == currentFloorIndex) - // { - // machine.AssignAnimators(); - // } - // else - // { - // machine.ReleaseAnimators(); - // } - // } - //} + { + if (isSelected) + { + var controller = OctopusTwinAppMain.Instance.cameraController; + controller.SetViewMode(ViewMode.PerspectiveView); + } }, - new CameraViewModeChangedCommand(ViewMode.PerspectiveView), + null, "Quarter View 시점으로 변경합니다."); // 화면 캡처 @@ -100,8 +81,8 @@ namespace ChunilENG.UI // 내/외벽 활성화/비활성화 toolbarModel.AddToggleButton("button_icon_control", false, - "Prefabs/UI/Toolbar/images/IMG_WallControl_on", "Prefabs/UI/Toolbar/images/IMG_WallControl_off", + "Prefabs/UI/Toolbar/images/IMG_WallControl_on", (isSelected) => { var itemManager = ChunilENGSceneMain.Instance.GetManager(); @@ -131,7 +112,7 @@ namespace ChunilENG.UI } public void DeactiveSideToolButton() { - toolbar.SetToggleButtonState("button_icon_control", false); + toolbar.SetToggleButtonState("button_icon_control", false, true); toolbar.SetRadioButtonSelection("CameraControlGroup", "Quarter View", true); } } diff --git a/Assets/Scripts/KEPCO/Command/UICommand/OpenHomePanelCommand.cs b/Assets/Scripts/KEPCO/Command/UICommand/OpenHomePanelCommand.cs index 1d43015c..f86cb5f0 100644 --- a/Assets/Scripts/KEPCO/Command/UICommand/OpenHomePanelCommand.cs +++ b/Assets/Scripts/KEPCO/Command/UICommand/OpenHomePanelCommand.cs @@ -24,7 +24,7 @@ namespace KEPCO.Command var uiManager = KEPCOSceneMain.Instance.GetManager(); uiManager.GetCanvas().ClosePanel(); - //uiManager.GetCanvas().GetPanel().ResetToolBox(); + uiManager.GetCanvas().GetPanel().InitSideToolButton(); } } } \ No newline at end of file diff --git a/Assets/Scripts/KEPCO/UI/LeftSidePanel.cs b/Assets/Scripts/KEPCO/UI/LeftSidePanel.cs index 86026929..99ff8d00 100644 --- a/Assets/Scripts/KEPCO/UI/LeftSidePanel.cs +++ b/Assets/Scripts/KEPCO/UI/LeftSidePanel.cs @@ -15,29 +15,18 @@ namespace KEPCO.UI { [SerializeField] private Toolbar toolbar; - [SerializeField] - private SideTabBar sideTabBar; private CaptureRecoder recorder; public override async UniTask Init() { toolbar = transform.GetComponentInChildren(); - sideTabBar = transform.GetComponentInChildren(); SetupCaptureSetting(); SetupToolBox(); await UniTask.CompletedTask; } - private void OnEnable() - { - SetupToolBox(); - - var initialViewCommand = new CameraViewModeChangedCommand(ViewMode.PerspectiveView); - initialViewCommand.Execute(); - } - private void SetupToolBox() { // ToolbarModel 인스턴스 생성 @@ -48,15 +37,27 @@ namespace KEPCO.UI toolbarModel.AddRadioButton("CameraControlGroup", "Top View", false, "Prefabs/UI/Toolbar/images/ic_camera_top_on", "Prefabs/UI/Toolbar/images/ic_camera_top_off", - (IsSelected) => { if (IsSelected) Debug.Log("2D 뷰 선택됨"); }, - new CameraViewModeChangedCommand(ViewMode.TopView), - "Top View 시점으로 변경합니다."); - + (isSelected) => + { + if (isSelected) + { + var controller = OctopusTwinAppMain.Instance.cameraController; + controller.SetViewMode(ViewMode.TopView); + } + }, null, + "Top View 시점으로 변경합니다."); toolbarModel.AddRadioButton("CameraControlGroup", "Quarter View", true, "Prefabs/UI/Toolbar/images/ic_camera_quarter_on", "Prefabs/UI/Toolbar/images/ic_camera_quarter_off", - (IsSelected) => { if (IsSelected) Debug.Log("3D 뷰 선택됨"); }, - new CameraViewModeChangedCommand(ViewMode.PerspectiveView), + (isSelected) => + { + if (isSelected) + { + var controller = OctopusTwinAppMain.Instance.cameraController; + controller.SetViewMode(ViewMode.PerspectiveView); + } + }, + null, "Quarter View 시점으로 변경합니다."); // 화면 캡처 @@ -96,6 +97,12 @@ namespace KEPCO.UI recorder = new CaptureRecoder(); recorder.Setup(); } + + public void InitSideToolButton() + { + toolbar.SetToggleButtonState("button_gis_control", true, true); + toolbar.SetRadioButtonSelection("CameraControlGroup", "Quarter View", true); + } } } diff --git a/Assets/Scripts/KEPCO/UI/TopMenuPanel.cs b/Assets/Scripts/KEPCO/UI/TopMenuPanel.cs index 5098795c..a5cdb748 100644 --- a/Assets/Scripts/KEPCO/UI/TopMenuPanel.cs +++ b/Assets/Scripts/KEPCO/UI/TopMenuPanel.cs @@ -33,11 +33,6 @@ namespace KEPCO.UI await UniTask.CompletedTask; } - private void OnEnable() - { - SetupToolBox(); - } - private void SetupTopMenu() { if (topMenu == null)