我试图统一自定义我的按钮,但由于某种原因,按钮的名称在按钮的角落重复,无法自定义/删除。我如何摆脱重复?
public GUIStyle style;
public Texture Load;
public Texture backGroundTexture;
void OnGUI() {
GUI.skin.button = style;
GUI.DrawTexture (new Rect (0, 0, Screen.width, Screen.height), backGroundTexture, ScaleMode.ScaleToFit);
//GUI.DrawTexture (new Rect (0, 0, 200, 73), Load, ScaleMode.ScaleToFit);
if (GUI.Button (new Rect (Screen.width / 2.5f,Screen.height / 5 ,200,73), "Load")) {
Application.LoadLevel(1);
}
if (GUI.Button (new Rect (Screen.width / 2.5f, Screen.height / 3, Screen.width / 5, Screen.height/10), "Exit Game")) {
Application.Quit();
}
}