[정영민] 층 조절 기능 추가 및 아이콘 오류 수정

26.03.18
- 층 자동 조절 기능 및 수동 조절 기능 추가
- 설비명 아이콘 안 보이는 오류 수정
- 카메라 2D/3D 위치 조정
This commit is contained in:
정영민
2026-03-20 12:47:10 +09:00
parent a616d03af6
commit 81ba9de085
20 changed files with 201343 additions and 21144 deletions

View File

@@ -1,6 +1,6 @@
<Solution> <Solution>
<Project Path="Assembly-CSharp.csproj" />
<Project Path="com.Tivadar.Best.HTTP.csproj" /> <Project Path="com.Tivadar.Best.HTTP.csproj" />
<Project Path="Assembly-CSharp.csproj" />
<Project Path="RenderHeads.AVProMovieCapture.Demos.csproj" /> <Project Path="RenderHeads.AVProMovieCapture.Demos.csproj" />
<Project Path="com.Tivadar.Best.MQTT.csproj" /> <Project Path="com.Tivadar.Best.MQTT.csproj" />
<Project Path="RenderHeads.AVProMovieCapture.Runtime.csproj" /> <Project Path="RenderHeads.AVProMovieCapture.Runtime.csproj" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e9074fab59981e24ea177f1361c7dd5f guid: 47452ffd3407fe84e85c351bb0562dd0
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9458e5537061e7945a771b442a1d3413 guid: 11b6b022a11e1f64e878ad708ab2309f
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}

File diff suppressed because one or more lines are too long

View File

@@ -122,9 +122,9 @@ namespace AZTECHWB
perspectiveState.pivotRotation = originRotation; perspectiveState.pivotRotation = originRotation;
orthoState.elevation = 90f; orthoState.elevation = 90f;
orthoState.distance = originValue.y; orthoState.distance = 55f;
orthoState.azimuth = 0f; orthoState.azimuth = 180f;
orthoState.pivotPosition = Vector3.zero; orthoState.pivotPosition = new Vector3(-37.5f, cameraPivot.transform.position.y, 32f);
orthoState.pivotRotation = originRotation; orthoState.pivotRotation = originRotation;
SetViewMode(ViewMode.PerspectiveView); SetViewMode(ViewMode.PerspectiveView);
} }
@@ -164,7 +164,10 @@ namespace AZTECHWB
if (boundery == null) if (boundery == null)
return true; return true;
return boundery.bounds.Contains(camera.transform.position); var checkingBounds = boundery.bounds;
checkingBounds.size = checkingBounds.size + new Vector3(10,10,10);
return checkingBounds.Contains(camera.transform.position);
} }
private void Move() private void Move()
@@ -303,10 +306,10 @@ namespace AZTECHWB
break; break;
case ViewMode.TopView: case ViewMode.TopView:
orthoState.elevation = 90f; // 90 or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> orthoState.elevation = 90f;
orthoState.distance = 60f; orthoState.distance = 55f;
orthoState.azimuth = 0f; orthoState.azimuth = 180f;
orthoState.pivotPosition = Vector3.zero; orthoState.pivotPosition = new Vector3(-37.5f, cameraPivot.transform.position.y, 32f);
break; break;
} }
} }

View File

@@ -15,8 +15,8 @@ namespace AZTECHWB.Command
var raycaster = AZTECHSceneMain.Instance.GetManager<Raycaster>(); var raycaster = AZTECHSceneMain.Instance.GetManager<Raycaster>();
raycaster.SetInteractable(false); raycaster.SetInteractable(false);
//var building = AZTECHSceneMain.Instance.building; var building = AZTECHSceneMain.Instance.building;
//building.ActiveRoof(true); building.SetActiveEmptyFloor(true);
var machineStatusItemManager = AZTECHSceneMain.Instance.GetManager<MachineStatusItemManager>(); var machineStatusItemManager = AZTECHSceneMain.Instance.GetManager<MachineStatusItemManager>();
machineStatusItemManager.SetActiveIcons(false); machineStatusItemManager.SetActiveIcons(false);

View File

@@ -4,7 +4,6 @@ using AZTECHWB.Core;
using AZTECHWB.Extensions; using AZTECHWB.Extensions;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
namespace AZTECHWB.Management namespace AZTECHWB.Management
@@ -68,7 +67,7 @@ namespace AZTECHWB.Management
foreach (var machineIcon in machineIcons.Values) foreach (var machineIcon in machineIcons.Values)
{ {
machineIcon.gameObject.SetActive(isActive); machineIcon.Deactive();
} }
} }
@@ -94,7 +93,7 @@ namespace AZTECHWB.Management
machineIcon.onClickIcon += OnClickMachineKPI; machineIcon.onClickIcon += OnClickMachineKPI;
machineIcons.Add(data.worknm, machineIcon); machineIcons.Add(data.worknm, machineIcon);
machineIcon.gameObject.SetActive(false); machineIcon.Deactive();
machine.machineStatusItem = machineIcon; machine.machineStatusItem = machineIcon;
iconToMachines.Add(machineIcon, machine); iconToMachines.Add(machineIcon, machine);
@@ -175,25 +174,25 @@ namespace AZTECHWB.Management
Vector3 screenPos = controller.Camera.WorldToScreenPoint(label.targetTransform.position + worldOffset); Vector3 screenPos = controller.Camera.WorldToScreenPoint(label.targetTransform.position + worldOffset);
if (screenPos.z < 0) if (screenPos.z < 0)
{ {
label.gameObject.SetActive(false); label.Deactive();
continue; continue;
} }
// 화면 이탈 체크 // 화면 이탈 체크
if (!IsOnScreen(label.screenPosition)) if (!IsOnScreen(label.screenPosition))
{ {
label.gameObject.SetActive(false); label.Deactive();
continue; continue;
} }
// 특정 레이어에 가려짐 체크 // 특정 레이어에 가려짐 체크
if (IsOccluded(label.targetTransform.position)) if (IsOccluded(label.targetTransform.position))
{ {
label.gameObject.SetActive(false); label.Deactive();
continue; continue;
} }
label.gameObject.SetActive(true); label.Active();
} }
} }

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using AZTECHWB.Core; using AZTECHWB.Core;
using Unity.Collections;
using UnityEngine; using UnityEngine;
namespace AZTECHWB namespace AZTECHWB
@@ -9,12 +10,10 @@ namespace AZTECHWB
{ {
public List<Floor> floorList = new List<Floor>(); public List<Floor> floorList = new List<Floor>();
public List<Machine> machineList = new List<Machine>(); public List<Machine> machineList = new List<Machine>();
public Roof roof;
public bool isOnlyMachineFloorsEnabled; public bool isOnlyMachineFloorsEnabled;
public bool isAutoActiveFloor;
public void Init() public void Init()
{ {
roof = transform.GetComponentInChildren<Roof>(true);
machineList.Clear(); machineList.Clear();
floorList.Clear(); floorList.Clear();
@@ -30,26 +29,39 @@ namespace AZTECHWB
{ {
floorList.Add(floor[i]); floorList.Add(floor[i]);
} }
isAutoActiveFloor= true;
} }
private void LateUpdate() private void Update()
{ {
if (!isAutoActiveFloor)
return;
if (AZTECHAppMain.Instance.cameraController == null) if (AZTECHAppMain.Instance.cameraController == null)
return; return;
var cam = AZTECHAppMain.Instance.cameraController; var cam = AZTECHAppMain.Instance.cameraController;
isOnlyMachineFloorsEnabled = cam.IsCameraInsideBoundary() && cam.Camera.transform.localPosition.y < 20f ? true : false; isOnlyMachineFloorsEnabled = cam.IsCameraInsideBoundary();
foreach(var floor in floorList) var equipmentInFloor = floorList.FirstOrDefault(f => !f.isEmptyFloor);
equipmentInFloor.gameObject.SetActive(isOnlyMachineFloorsEnabled);
var emptyFloor = floorList.FirstOrDefault(f => f.isEmptyFloor);
emptyFloor.gameObject.SetActive(!isOnlyMachineFloorsEnabled);
}
public void SetActiveEmptyFloor(bool isOn)
{
isAutoActiveFloor = isOn;
if (!isAutoActiveFloor)
{ {
if (floor.isEmptyFloor) var equipmentInFloor = floorList.FirstOrDefault(f => !f.isEmptyFloor);
{ equipmentInFloor.gameObject.SetActive(true);
floor.gameObject.SetActive(!isOnlyMachineFloorsEnabled); isOnlyMachineFloorsEnabled = true;
}
else var emptyFloor = floorList.FirstOrDefault(f => f.isEmptyFloor);
{ emptyFloor.gameObject.SetActive(false);
floor.gameObject.SetActive(isOnlyMachineFloorsEnabled);
}
} }
} }
} }

View File

@@ -6,12 +6,10 @@ namespace AZTECHWB
{ {
public class Machine : MonoBehaviour public class Machine : MonoBehaviour
{ {
private Dictionary<Component, MeshRenderer[]> meshGroupCache = new();
public MachineStatusItem machineStatusItem; public MachineStatusItem machineStatusItem;
public string machineName; public string machineName;
private bool isAlarmActive; //private bool isAlarmActive;
public string[] typeOptions; public string[] typeOptions;
public Sprite previewImage; public Sprite previewImage;
@@ -25,10 +23,10 @@ namespace AZTECHWB
{ {
centerPos = transform.GetMeshCenter(); centerPos = transform.GetMeshCenter();
} }
public void SetAlarm(string state) // public void SetAlarm(string state)
{ // {
isAlarmActive = state == "SET" ? true : false; // isAlarmActive = state == "SET" ? true : false;
} // }
} }
} }

View File

@@ -1,6 +0,0 @@
using UnityEngine;
public class Roof : MonoBehaviour
{
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 6e093f998e1d5444794dfffc794ae664

View File

@@ -1,39 +0,0 @@
using UnityEngine;
public class WarningLight : MonoBehaviour
{
public Transform currentLight;
public Transform RedLight;
public Transform YellowLight;
public Transform GreenLight;
private void Awake()
{
RedLight = transform.Find("WarningLightRed").GetChild(0);
YellowLight = transform.Find("WarningLightYellow").GetChild(0);
GreenLight = transform.Find("WarningLightGreen").GetChild(0);
}
public void SetCurrentLight(Transform light)
{
if (currentLight != light && currentLight != null)
{
currentLight.gameObject.SetActive(false);
}
currentLight = light;
currentLight.gameObject.SetActive(true);
}
public void SetYellowLightActive()
{
SetCurrentLight(YellowLight);
}
public void SetGreenLightActvie()
{
SetCurrentLight(GreenLight);
}
public void SetRedLightActvie()
{
SetCurrentLight(RedLight);
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 032807d483d94f44fae2eca28705557f

View File

@@ -101,14 +101,14 @@ namespace AZTECHWB.UI
"설비 요약 정보 UI를 활성화/비활성화 합니다."); "설비 요약 정보 UI를 활성화/비활성화 합니다.");
toolbarModel.AddToggleButton("button_floor_control", true, toolbarModel.AddToggleButton("button_floor_control", true,
"Prefabs/UI/Toolbar/images/ic_floor_active", "Prefabs/UI/Toolbar/images/ic_floor_auto_on",
"Prefabs/UI/Toolbar/images/ic_floor_deactive", "Prefabs/UI/Toolbar/images/ic_floor_auto_off",
(isSelected) => (isSelected) =>
{ {
//AZTECHSceneMain.Instance.building.ActiveRoof(isSelected); AZTECHSceneMain.Instance.building.SetActiveEmptyFloor(isSelected);
}, },
null, null,
"설비가 있는 층을 제외한 층을 활성화/비활성화 합니다."); "층 자동 전환 기능 및 설비가 있는 층을 제외한 층을 활성화/비활성화 합니다.");
// --- 툴바 모델 구성 끝 --- // --- 툴바 모델 구성 끝 ---
toolbar.SetData(toolbarModel); toolbar.SetData(toolbarModel);

View File

@@ -63,7 +63,21 @@ MonoBehaviour:
- rid: 8987682325826371591 - rid: 8987682325826371591
- rid: 8987682325826371592 - rid: 8987682325826371592
m_RuntimeSettings: m_RuntimeSettings:
m_List: [] m_List:
- rid: 6852985685364965378
- rid: 6852985685364965379
- rid: 6852985685364965380
- rid: 6852985685364965381
- rid: 6852985685364965384
- rid: 6852985685364965385
- rid: 6852985685364965392
- rid: 6852985685364965394
- rid: 8712630790384254976
- rid: 8987682325826371585
- rid: 8987682325826371587
- rid: 8987682325826371588
- rid: 8987682325826371591
- rid: 8987682325826371592
m_AssetVersion: 8 m_AssetVersion: 8
m_ObsoleteDefaultVolumeProfile: {fileID: 0} m_ObsoleteDefaultVolumeProfile: {fileID: 0}
m_RenderingLayerNames: m_RenderingLayerNames:

View File

@@ -2,13 +2,13 @@
Resolution=1920x1080 Resolution=1920x1080
ScreenMode=0 ScreenMode=0
Texture=0 Texture=0
Shadow=1 Shadow=3
AA=2 AA=2
VSync=1 VSync=1
AF=0 AF=0
[Control] [Control]
MoveSpeed=5 MoveSpeed=10
RotateSpeed=30 RotateSpeed=30
ZoomSpeed=50 ZoomSpeed=50

View File

@@ -6,8 +6,8 @@ EditorBuildSettings:
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 1 - enabled: 1
path: "Assets/Scenes/\uC544\uC988\uD14D.unity" path: "Assets/Scenes/\uC544\uC988\uD14D_Main.unity"
guid: adf7868fe2293284783fb7f2a85d7258 guid: d1c01efad02c2d04ab6b0ea993da6fb8
m_configObjects: m_configObjects:
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
m_UseUCBPForAssetBundles: 0 m_UseUCBPForAssetBundles: 0