首先,抱歉我的语法不好。谁能告诉我为什么我的盒子没有出现?我已将这些脚本放在我的主摄像头上,但它仍然无法正常工作。或者有什么方法可以解决这个问题吗?谢谢
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Login : MonoBehaviour {
public GUIText loginText;
public static string Email = "";
public static string Password = "";
public string CurrentMenu = "Login";
private string CreateAccountUrl = "";
private string LoginUrl = "";
public float X;
public float Y;
public float Width;
public float Height;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnGUI(){
if(CurrentMenu == "Login"){
LoginGUI();
}
else if(CurrentMenu == "CreateAccount"){
CreateAccountGUI();
}
}
void LoginGUI(){
GUI.Box(new Rect(X, Y, Width, Height), loginText);
}
void CreateAccountGUI(){
}
}