-2
我已經在MonoDevelop中輸入此代碼,並將其拖動到主相機。插入按鈕,腳本與統一的c#腳本不出現
using UnityEngine;
using System.Collections;
public class test : MonoBehaviour {
void onGUI() {
GUI.Button(new Rect(Screen.width * 0.5f, Screen.height * 0.5f, 200, 50), "Click ME!");
}
}
但是按鈕仍然沒有出現。我錯過了什麼?
可能的重複[如何將控件放在屏幕上?](http://stackoverflow.com/questions/34699761/how-do-i-put-controls-on-screen) – Fattie 2016-02-03 19:19:01