我正在尝试创建一个可点击的GUI.DrawTexture,但错误说“Assets / Script / guisettingonmenu.js(46,13):UCE0001:';'预期。在末尾插入一个分号。“ 有人可以帮助我吗?
//make it clickable
Rect onButton = new Rect(640, 250, 80, 40);
GUI.DrawTexture(onButton, onNormal);
if(Input.GetMouseButton(0)){
if (onButton.Contains(Event.current.mousePosition)){
GUI.DrawTexture(onButton, onHover);
}
}
答案 0 :(得分:0)
是js中的c#语法,是
var onButton : Rect = new Rect(640, 250, 80, 40);