[정영민] 설비 아이콘 활성화 오류 및 카메라 위치 오류 수정
26.02.10 - 설비 아이콘 활성화 - 카메라 위치 오류 수정
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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<MachineInfoItemManager>();
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace KEPCO.Command
|
||||
var uiManager = KEPCOSceneMain.Instance.GetManager<KEPCOUIManager>();
|
||||
uiManager.GetCanvas<PopupCanvas>().ClosePanel();
|
||||
|
||||
//uiManager.GetCanvas<StaticCanvas>().GetPanel<LeftSidePanel>().ResetToolBox();
|
||||
uiManager.GetCanvas<StaticCanvas>().GetPanel<LeftSidePanel>().InitSideToolButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<Toolbar>();
|
||||
sideTabBar = transform.GetComponentInChildren<SideTabBar>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,11 +33,6 @@ namespace KEPCO.UI
|
||||
await UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
SetupToolBox();
|
||||
}
|
||||
|
||||
private void SetupTopMenu()
|
||||
{
|
||||
if (topMenu == null)
|
||||
|
||||
Reference in New Issue
Block a user