unity-UGUI隐藏按钮

方法1:

Button btn;
btn.gameObject.setActive(false);

方法2:

Button btn;
btn.transform.localScale = Vector3.zero;

方法3:

将button移到屏幕外

方法4:

调整color的alpha值为0;

你可能感兴趣的:(unity-C#脚本)