unity3d场景切换问题(build setting 已经设计了)
场景都设计了,怎么还是编译错误,我电脑是window7,64位functionStart(){}functionUpdate(){}functionOnGUI(){if(...
场景都设计了,怎么还是编译错误,我电脑是window 7,64位
function Start () {
}
function Update () {
}
function OnGUI(){
if(GUI.Button(Rect(Screen.width/2-30,Screen.height/2-50,60,30),"Screen 1"))
{
print("you click Screen 1 button");
Application.loadedLevel(1);
}
else if(GUI.Button(Rect(Screen.width/2-30,Screen.height/2-10,60,30),"Screen 2"))
{
print("you click Screen 2 button");
Application.loadedLevel(2);
}
else if(GUI.Button(Rect(Screen.width/2-30,Screen.height/2+30,60,30),"Quit"))
{
print("you click Quit button");
Application.Quit();
}
} 展开
function Start () {
}
function Update () {
}
function OnGUI(){
if(GUI.Button(Rect(Screen.width/2-30,Screen.height/2-50,60,30),"Screen 1"))
{
print("you click Screen 1 button");
Application.loadedLevel(1);
}
else if(GUI.Button(Rect(Screen.width/2-30,Screen.height/2-10,60,30),"Screen 2"))
{
print("you click Screen 2 button");
Application.loadedLevel(2);
}
else if(GUI.Button(Rect(Screen.width/2-30,Screen.height/2+30,60,30),"Quit"))
{
print("you click Quit button");
Application.Quit();
}
} 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询