-2

私はこれをスクリプトに持っています:

Button button = GameObject.FindGameObjectWithTag("MainCanvas").GetComponentInChildren<Button>();

そして、そのスクリプトの Update() 関数で、次のようなことをしたいと思います:

if button clicked { // do something }

誰かが私がこれを行う方法を説明できますか?

4

1 に答える 1