建议运行点击后,检查一下hierarchy下你的行枣button按钮的子物体中有没有多出来panel
在unity编辑器里运行游戏实现退出功能使用亏搜斗 UnityEditor.EditorApplication.isPlaying = false要是打包出来运行游戏实现退出游戏是Application.Quit()
示例如下:
if (GUILayout.Button("退漏桥出游销磨戏", GUILayout.Height(100), GUILayout.Width(100)))
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false
#else
Application.Quit()
#endif
Debug.Log("退出游戏")
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)