Files
EnglewoodLAB/Assets/Scripts/UI/BackHomeCommandMono.cs
SOOBEEN HAN f1894889ee <refactor> Octopus Twin 템플릿 적용
- 기능 외 UI 구조만 적용
- 프로젝트에 걸맞는 UI는 재작업 필요
2026-02-23 18:20:09 +09:00

32 lines
629 B
C#

using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
namespace EnglewoodLAB
{
[RequireComponent(typeof(Button))]
public class BackHomeCommandMono : MonoBehaviour
{
private Button button;
[Header("Command Settings")]
[SerializeField] private UnityEvent onExecuteCommand;
private void Awake()
{
button = GetComponent<Button>();
}
private void Start()
{
button.onClick.AddListener(Execute);
}
public void Execute()
{
onExecuteCommand?.Invoke();
}
}
}