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!");
    }
}

 

posted on 2019-06-27 15:49  炼金师  阅读(3319)  评论(0编辑  收藏  举报

导航