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

 

转载于:https://www.cnblogs.com/Transmuter/p/11097493.html

你可能感兴趣的:(Unity场景加载完成回调)