cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Quest Unity loading scene issue

alivenow
Explorer
I am working on the oculus quest, and facing the scene loading issue. Same issue found in Unity 2019.2.2 and 2019.2.3 versions. The following code is using, but nothing happens.
  1. SceneManager.LoadSceneAsync(1, LoadSceneMode.Additive);

if I use LoadSceneMode.Single redirecting to the oculus home page.


4 REPLIES 4

dcfreeman
Explorer
This is still an issue even in version 12.0 of the Oculus integration. Could someone please verify that SceneManager.LoadSceneAsync(1) really does work? 

zijun_yin_921
Honored Guest
I am working on Oculus Quest and Unity 2018.4.10 with Oculus integration 1.43.0. I didn't change the sample scenes but Startscene cannot work functionally. Once I click a button to switch scene, my app force quit to the home page. I guess there is problem with code SceneManager.LoadSceneAsync. Can anyone help?

SaaskunStudios
Honored Guest
In my case I'm using the SceneManager.LoadSceneAsync("Scene index") with the asyncOperation.allowSceneActivation = false; 

If I set it to true doesn't load the scene.

Sample Code:


AsyncOperation asyncOperation;
    private int sceneLoadingIndex;
    private bool finishLoadingScene;

    private bool loadingScene;

 private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
            LoadLevel(1);

        if(loadingScene)
        {
            actualTime += Time.deltaTime;
            if(actualTime >= changeTime)
            {
                asyncOperation.allowSceneActivation = true;
                loadingScene = false;
            }
        }
    }

    public void LoadLevel(int sceneIndex)
    {
        sceneLoadingIndex = sceneIndex;
        StartCoroutine(LoadSceneProgress());
        loadingScene = true;
    }

    IEnumerator LoadSceneProgress()
    {
        yield return null;

        asyncOperation = SceneManager.LoadSceneAsync(sceneLoadingIndex);
        asyncOperation.allowSceneActivation = false;

        while (!asyncOperation.isDone && !finishLoadingScene)
        {
            Debug.Log("Loading " + asyncOperation.progress);
            if (asyncOperation.progress >= 0.9f)
                finishLoadingScene = true;
            yield return null;
        }
    }


Did your approach work for you? I'm having the same issue