unity运行中点击牌子后弹出窗口后点击button没有反应
unity3d吧
全部回复
仅看楼主
level 1
需要代码的话应该怎么写啊
2024年06月27日 08点06分 1
level 8
关闭按钮吗?
你要在关闭按钮所在的“面板”上 挂上一个文件
文件 中写上这样一行代码
transform.Find( "closeButton" ).GetComponent<Button>().onClick.AddListener(() => {
gameObject.SetActive( false );
});
这里假设你关闭按钮的名字是“closeButton”
2024年06月28日 01点06分 2
level 8
窗口是UI吧 直接写点击事件
2024年07月01日 02点07分 3
1