当前位置 博文首页 > unity工具人的博客:unity设置button为选中状态
在脚本的start方法中设置为选中状态。
GetComponent<UnityEngine.UI.Button>().Select();
该方法有问题:如果点击屏幕,button的高亮状态就会消失,还是使用Toggle组件比较靠谱:https://blog.csdn.net/weixin_45023328/article/details/107813810