(client) feat:添加预制件脚本,规范化Dev菜单加载

This commit is contained in:
m0_75251201
2025-07-19 18:47:37 +08:00
parent 0c8eebdd4b
commit 996b2d8a9f
11 changed files with 242 additions and 210 deletions

View File

@ -0,0 +1,26 @@
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);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 229699c7a1dc4caa84d46e6cfba6a8d8
timeCreated: 1752918181

View File

@ -0,0 +1,17 @@
using TMPro;
using UnityEngine;
namespace Prefab
{
public class TextPrefab : MonoBehaviour
{
public TMP_Text text;
public string Label
{
get{return text.text;}
set{text.text = value;}
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 13c16a6a94284487838eb5c60f53ed0d
timeCreated: 1752918417