修改按钮名字
This commit is contained in:
parent
7da2890d99
commit
e093f10495
@ -40,6 +40,7 @@ namespace QFramework.Example
|
||||
foreach (var item in mData.btns)
|
||||
{
|
||||
GameObject obj = GameObject.Instantiate(BtnPrefab.gameObject, BtnContent);
|
||||
obj.name = item;
|
||||
var label = obj.transform.Find("Label").GetComponent<TextMeshProUGUI>();
|
||||
label.text = item;
|
||||
obj.GetComponent<Button>().onClick.AddListener(() =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user