Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Question Loss of WebXR Headset Tracking after Addressable Loading

Discussion in 'AR/VR (XR) Discussion' started by Bwavo, Sep 15, 2020.

  1. Bwavo


    Feb 22, 2017
    Hello everyone.
    I'm creating an experience for WebXR and I'm running into a really interesting issue. Here's the problem (copied from my GitHub issue):
    While playing my experience in WebXR, my headset will lose tracking after loading in certain addressable scenes. By lose tracking, I mean that the current orientation becomes fixed onto the screen. It is a very similar effect to disabling the CameraMain game object in the editor. After this occurs in WebXR though, I am still able to teleport, snap turn, and otherwise see the game changing. Controllers are still tracked. The headset's image just doesn't move to match the rotation of my head. I know that no cameras are being disabled, I created a console log that would notify me if this were the case.
    I've begun to suspect that I may be running out of memory, which is causing this loss of tracking. I'm getting no errors, warnings, or anything else that would show that this is the cause, though. Here's a screenshot of the console, showing that everything is successfully being stored in the cache and no errors are appearing (most of this is related to the addressable loading):

    There are a few things that make me unsure that it is truly memory related, though. Some large bundles (40+mb) load fine and don't result in a loss of tracking, whereas other smaller scenes (~24mb) do. In addition, sometimes the loss of tracking occurs immediately when the bundle is downloaded, other times it occurs a few minutes after the download, regardless of where I am or what I am doing within the experience. Also, this only occurs in an actual browser, not within the Unity Editor, so I'm led to believe it isn't caused by a buggy script. The server I'm loading the files from is definitely fast enough as well.

    Unity Editor: 2019.3.15f1
    Browser: Occurs on both Firefox Developer Edition 81 and Firefox 80
    OS: Windows 10
    Headset: Oculus Rift CV1

    Thanks for reading, hopefully someone will have some insight as to what is happening here.