Files
XRLib/Assets/Scripts/UVC/UI/Commands/QuitApplicationCommand.cs

30 lines
720 B
C#
Raw Normal View History

2025-07-28 19:59:35 +09:00
#nullable enable
using UnityEngine;
2025-06-12 19:25:33 +09:00
namespace UVC.UI.Commands
{
// 애플리케이션 종료 커맨드
public class QuitApplicationCommand : ICommand
{
2025-07-28 19:59:35 +09:00
public void Execute(object? parameter = null)
2025-06-12 19:25:33 +09:00
{
2025-06-16 19:30:01 +09:00
// 파라미터는 여기서는 사용되지 않을 수 있음
if (parameter != null)
{
Debug.Log($"QuitApplicationCommand 실행됨 (파라미터 무시됨: {parameter})");
}
else
{
Debug.Log("QuitApplicationCommand 실행됨");
}
2025-06-12 19:25:33 +09:00
#if UNITY_EDITOR
2025-06-16 19:30:01 +09:00
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
2025-06-12 19:25:33 +09:00
#endif
}
}
}