unity3D 从一个sences跳转到另一个sences,用C# 怎么写
RT,我这样写的,但是报错了,Application.LoadLevel(nextLevel);这一句报错的publicclassstart:MonoBehaviour{...
RT,我这样写的,但是报错了,Application.LoadLevel(nextLevel); 这一句报错的
public class start : MonoBehaviour {
public int timeLength = 2;
public int nextLevel;
private float myTime;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
myTime += Time.deltaTime;
if (myTime > timeLength)
{
Application.LoadLevel(nextLevel);
}
}
} 展开
public class start : MonoBehaviour {
public int timeLength = 2;
public int nextLevel;
private float myTime;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
myTime += Time.deltaTime;
if (myTime > timeLength)
{
Application.LoadLevel(nextLevel);
}
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询