unity5.3

Unity 5.3 How to load current level?

只谈情不闲聊 提交于 2019-11-27 06:37:12
问题 before Unity 5.3, I could do Application.LoadLevel(Application.loadedLevel); But now it's something weird with SceneManager. I've read documentation but nothing. How do I get the current scene and load it (Unity 5.3f4)? Thanks! 回答1: Use the new SceneManager and make sure you include the namespace UnityEngine.SceneManagement using UnityEngine.SceneManagement; public class Example { public void ReloadCurrentScene() { // get the current scene name string sceneName = SceneManager.GetActiveScene()