버그 수정

This commit is contained in:
logonkhi
2025-11-14 19:54:04 +09:00
parent 934fff54a7
commit 235b4bc28a
18 changed files with 669 additions and 293 deletions

View File

@@ -1,15 +1,17 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using Cysharp.Threading.Tasks;
using SHI.modal;
using System;
using System.Globalization;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 샘플 장면 드라이버: 버튼 클릭으로 SHI BlockDetail 모달을 생성/표시하고,
/// StreamingAssets에서 glb/간트 JSON을 읽어 모달에 전달합니다.
/// </summary>
public class ShiPopupSample : MonoBehaviour
{
[SerializeField]
private GameObject blockDetailModalPrefab;
@@ -18,14 +20,12 @@ public class ShiPopupSample : MonoBehaviour
private BlockDetailModal blockDetailModal;
void Start()
private void Start()
{
if (openModalButton != null)
{
openModalButton.onClick.AddListener(() =>
{
{
if (blockDetailModal == null && blockDetailModalPrefab != null)
{
Canvas canvas = Canvas.FindFirstObjectByType<Canvas>();
@@ -39,7 +39,7 @@ public class ShiPopupSample : MonoBehaviour
}
[Serializable]
private class RawScheduleSegment
public class RawScheduleSegment
{
public string ItemId;
public string Start;
@@ -49,11 +49,14 @@ public class ShiPopupSample : MonoBehaviour
}
[Serializable]
private class RawGanttChartData
public class RawGanttChartData
{
public RawScheduleSegment[] Segments;
}
/// <summary>
/// StreamingAssets에서 샘플 간트 JSON과 모델을 읽어 모달에 적용합니다.
/// </summary>
private async UniTaskVoid SetupData()
{
if (blockDetailModal == null)
@@ -66,7 +69,7 @@ public class ShiPopupSample : MonoBehaviour
string glbPath = Path.Combine(sa, "block.glb");
string jsonPath = Path.Combine(sa, "sample_gantt_data.json");
// Load JSON (editor/standalone path). For Android/WebGL, use UnityWebRequest if needed.
// 플랫폼에 따라 UnityWebRequest 사용이 필요할 수 있음(여기선 Editor/Standalone 가정)
RawGanttChartData raw = null;
try
{