Files
XRLib/Assets/Scripts/UVC/Factory/Modal/Settings/SettingOpenCommand.cs

32 lines
943 B
C#
Raw Normal View History

#nullable enable
using UVC.UI.Commands;
using UVC.UI.Modal;
2025-08-07 21:12:44 +09:00
namespace UVC.Factory.Modal.Settings
{
2025-08-07 21:12:44 +09:00
public class SettingOpenCommand : ICommand
{
2025-08-08 18:33:29 +09:00
private object? _parameter;
public SettingOpenCommand(object? parameter = null)
{
_parameter = parameter;
}
public async void Execute(object? parameter = null)
{
FactoryCameraController.Instance.Enable = false; // 카메라 컨트롤러 비활성화
2025-08-07 21:12:44 +09:00
var modalContent = new ModalContent("Prefabs/UI/Modal/SettingModal")
{
2025-08-07 21:12:44 +09:00
Title = "설정 카테고리"
};
2025-08-08 18:33:29 +09:00
if(parameter != null) modalContent.Message = parameter.ToString();
else if(_parameter != null) modalContent.Message = _parameter.ToString();
await UVC.UI.Modal.Modal.Open<object>(modalContent);
FactoryCameraController.Instance.Enable = true;
}
}
}