playback 버그 수정

This commit is contained in:
logonkhi
2025-07-28 19:59:35 +09:00
parent f5a36697ba
commit 231af33e6f
43 changed files with 537 additions and 325 deletions

View File

@@ -1,3 +1,4 @@
#nullable enable
using UnityEngine;
using UVC.Data;
using UVC.Factory.Playback.UI;
@@ -9,9 +10,9 @@ namespace UVC.Factory.Playback
{
public class PlaybackCommand : ICommand
{
public async void Execute(object parameter = null)
public async void Execute(object? parameter = null)
{
FactoryCameraController.Instance.Enable = false;
var modalContent = new ModalContent(UIPlaybackListModal.PrefabPath)
{
Title = "Playback List",
@@ -19,21 +20,24 @@ namespace UVC.Factory.Playback
ShowCancelButton = false
};
object result = await UVC.UI.Modal.Modal.Open<bool>(modalContent);
UIPlaybackListItemData? result = await UVC.UI.Modal.Modal.Open<UIPlaybackListItemData>(modalContent);
Debug.Log($"PlaybackCommand result:{result}");
Debug.Log($"PlaybackCommand result==null:{result==null}");
if (result != null)
{
UIPlaybackListItemData data = (UIPlaybackListItemData)result;
UILoading.Show();
UIPlaybackListItemData data = result;
Debug.Log($"PlaybackCommand data:{data}");
UIPlayback.Instance.Show();
DataRepository.Instance.MqttReceiver.Stop();
await UIPlayback.Instance.SetData(data.date, data.time, data.sqlFileName);
await PlaybackService.Instance.StartAsync(data);
FactoryCameraController.Instance.Enable = true;
UILoading.Hide();
}
else
{
UILoading.Show();
PlaybackService.Instance.Stop();
PlaybackService.Instance.Exit();
FactoryCameraController.Instance.Enable = true;
UILoading.Hide();
}