Unity 5.3 How to load current level?

后端 未结 4 705
暗喜
暗喜 2020-12-11 01:14

before Unity 5.3, I could do

Application.LoadLevel(Application.loadedLevel);

But now it\'s something weird with SceneManager. I\'ve read d

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-11 01:37

    Another way for loading current scene with SceneMamager is Something Like this :

    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
    

    be sure that you have include SceneManager in your script.

提交回复
热议问题