예제 #1
0
    private void LoadMainScreen(AsyncOperationHandle <LoadSceneRequestSO> obj)
    {
        // Request to load scenes
        LoadSceneRequestSO loadSceneRequest = (LoadSceneRequestSO)_loadSceneRequest.Asset;

        if (loadSceneRequest != null)
        {
            loadSceneRequest.RaiseEvent(_sceneToLoad);
        }

        // Unload the initialization scene
        // It is the only scene in BuildSettings, thus it has index 0
        SceneManager.UnloadSceneAsync(0);
    }