-
unity 3d当游戏人物进入一个地方,跳转到另一个场景,这个怎么用代码实现
functionOnGUI(){if(GUI.Button(Rect(Screen.width/2,Screen.height-30,50,30),aTexture)){Application.LoadLevel(0);}}在这个脚本赋予前一个scene的camera,Application.LoadLevel(0);输入下一个scene的level就可以了。
发布时间:2025-05-10 11:46:55
functionOnGUI(){if(GUI.Button(Rect(Screen.width/2,Screen.height-30,50,30),aTexture)){Application.LoadLevel(0);}}在这个脚本赋予前一个scene的camera,Application.LoadLevel(0);输入下一个scene的level就可以了。