C# 编译器错误:意外的符号';}';
我的C#代码中有一个找不到的错误。我在Notepad++for Unity 5.2中编辑了它C# 编译器错误:意外的符号';}';,c#,unity3d,compiler-errors,C#,Unity3d,Compiler Errors,我的C#代码中有一个找不到的错误。我在Notepad++for Unity 5.2中编辑了它 using UnityEngine; using System.Collections; public class SplashScreenDelayed : MonoBehaviour { public float delayTime = 3; IEnumerator Start(){ yield return new WaitForSeconds( del
using UnityEngine;
using System.Collections;
public class SplashScreenDelayed : MonoBehaviour {
public float delayTime = 3;
IEnumerator Start(){
yield return new WaitForSeconds( delayTime );
Aplication.LoadLevel( 1 )
}
}
我在尝试编译时遇到以下错误:
我发现了错误。我需要修复应用程序的“应用程序”,并添加“ 在一行的末尾 现在代码如下所示:
using UnityEngine;
using System.Collections;
public class SplashScreenDelayed : MonoBehaviour {
public float delayTime = 3;
IEnumerator Start(){
yield return new WaitForSeconds(delayTime);
Application.LoadLevel(1);
}
}
但是unity说Application.LoadLevel是obselete。我发现了错误。我需要修复应用程序的“应用程序”,并添加“ 在一行的末尾 现在代码如下所示:
using UnityEngine;
using System.Collections;
public class SplashScreenDelayed : MonoBehaviour {
public float delayTime = 3;
IEnumerator Start(){
yield return new WaitForSeconds(delayTime);
Application.LoadLevel(1);
}
}
但是unity说Application.LoadLevel是obselete。在5.3中,加载场景有点不同。使用UnityEngine.SceneManagement使用名称空间
;
Application.LoadLevel(“SceneName”)
equalsSceneManager.LoadScene(“SceneName”);
有关定义,请访问第页。在5.3中,加载一个稍微不同的场景。使用UnityEngine.SceneManagement使用名称空间
;
Application.LoadLevel(“SceneName”)
equalsSceneManager.LoadScene(“SceneName”);
有关定义,请访问第页。浮点结尾处也缺少一个f--->3F您可能需要使用UnityEngine.SceneManagement导入
编码>然后使用SceneManager.LoadScene(sceneame)
。这是一种新的方法,并且应用程序。LoadLevel
已被弃用。浮点结尾处也缺少一个f--->3fy您可能需要使用UnityEngine.SceneManagement导入编码>然后使用SceneManager.LoadScene(sceneame)
。这是一种新的方法,不推荐使用Application.LoadLevel
。