26 lines
472 B
C#
26 lines
472 B
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Prefab
|
|
{
|
|
public class ButtonPrefab : MonoBehaviour
|
|
{
|
|
public Button button;
|
|
public TMP_Text text;
|
|
|
|
public string Label
|
|
{
|
|
get { return text.text; }
|
|
set { text.text = value; }
|
|
}
|
|
|
|
public void AddListener(UnityAction callback)
|
|
{
|
|
button.onClick.AddListener(callback);
|
|
}
|
|
}
|
|
|
|
|
|
} |