关于SceneManager.LoadScene(); 的使用问题

Scene with build index: couldn’t be loaded because it has not been added to the build settings.
要使用这个方法必须要引进一个类 using UnityEngine.SceneManagement;
然后再点击File→ build settings 把需要加载的场景拖进去关于SceneManager.LoadScene的使用问题
如图所示,右边就是SceneManager.LoadScene()里面的参数,比如SceneManager.LoadScene(0)就是加载的UI的场景最后再根据需要的不同调用就好了!

相关文章:

  • 2021-07-15
  • 2021-07-17
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2022-01-25
  • 2021-06-25
  • 2021-08-23
猜你喜欢
  • 2021-08-06
  • 2021-06-29
  • 2021-07-19
  • 2022-12-23
  • 2021-11-08
  • 2021-09-19
相关资源
相似解决方案