Unity 修改Button的文字

2022-03-25  本文已影响0人  114105lijia
using UnityEngine.UI;

public class Animation : MonoBehaviour
{

    public Button startBtn;

    // Start is called before the first frame update
    void Start()
    {
        Text text = startBtn.transform.Find("Text").GetComponent<Text>();
        text.text = "暂停";
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
上一篇 下一篇

猜你喜欢

热点阅读