Transmuter

Unity场景加载完成回调

using UnityEngine;
using UnityEngine.SceneManagement;


public class Example : MonoBehaviour
{
    void Start()
    {
        SceneManager.LoadScene("sceneName");
        SceneManager.sceneLoaded += CallBack;
    }

    public void CallBack(Scene scene, LoadSceneMode sceneType)
    {
        Debug.Log(scene.name + "is load complete!");
    }
}

 

分类:

技术点:

相关文章:

  • 2021-07-30
  • 2022-12-23
  • 2021-08-28
  • 2021-11-09
  • 2021-12-10
  • 2021-12-04
  • 2021-12-26
猜你喜欢
  • 2022-01-24
  • 2022-01-23
  • 2022-01-13
  • 2021-11-16
  • 2021-11-28
  • 2022-02-04
  • 2021-12-19
相关资源
相似解决方案