Forum Discussion
RM1181
2 years agoProtege
MR Utility Kit 63.0 - Scene Does Not Load From Device
Configuration:
Meta Quest 3
UE5.3.2 (Windows x64)
Mixed Reality Utility Kit Plugin 63.0
MetaXR Plugin 63.0
I just started using the MR Utility Kit and am having some problems with the sample project. The demo attempts to load the Scene description stored on the headset, and if that fails, it loads a random room from a JSON data table asset. The headset has a Scene already setup, and I found that while playing VR in the UE Editor, I could get the Scene to load after enabling "Spatial Data over Meta Quest Link" in the Oculus desktop app. At this point my room would load properly, but would soon start slowly "floating away" uncontrollably. So I turned off the World Locking feature in the MR Utility Kit plugin, and now the room stays in place (this drifting is probably a separate issue?). I packaged the project for Windows and played in PCVR, and the Scene loads correctly. But the main problem is when I package the APK and deploy to the headset, the Scene does not load in the standalone app and falls back to one of the random JSON rooms. The app has permission to use spatial data, so I don't know what's going on or how to troubleshoot this. Any thoughts or help would be greatly appreciated!
Long story short, it is working now!
I have used the MQDH before and looked at the device logs, but didn't know you could filter by app name, so hadn't found these logs very helpful in the past. So thanks for that!
Using the MQDH device logs and filtering on my app name, I noticed that there was some kind of trust issue with the app, which made me think maybe it was needing to connect to a Meta or Unreal server online. I develop in an environment where the headset is offline. So I went down to our lab, connected it to WIFI, and ran the sample project app and my VRTemplate app. After launching them multiple times, both failed to load the Scene, same as before. Disappointed, I went back to my desk to continue working offline. The headset had lost its Boundary, so I had to create a new one. I launched my test app, and voila, the Scene suddenly loaded. I reinstalled the app to start over fresh and see if I would need to go back to the lab and get online or recreate the Boundary again, but the Scene loaded fine without having to resort to any tricks. So not exactly sure which action fixed the problem, but I'm guessing it was launching the app while connected to the internet. Hopefully my journey here can help some other poor soul out there. 🙂
I appreciate you helping me think through this. It was very helpful!
14 Replies
Replies have been turned off for this discussion
- DreadHeadFredProtege
When you load the app on the headset does it prompt you to give permission for spatial data? I've had trouble with the default blueprint for this and often times, after giving permission, I have to exit the app then restart it. I've bandaided the code to add delay before and after "Request Scene Permission".
This is a macro on my Level's blueprint that I call on Begin Play before anything else. Seems to help for the 'first run' on the headset as long as I press the accept button in time.
Here's the Request Scene Permission function if you need it.
- RM1181Protege
Thanks for the reply. I've also had apps where I had to exit and restart after giving permission. Unfortunately, that does not work in this case. I did go ahead and add some delays like you showed above, just to give the app some time to get settled before trying to load the Scene, but still nothing...
- DreadHeadFredProtege
Sorry I can't be more help but at this point, maybe try deleting your room on the headset and set it up again. That's the next best thing I can suggest.
- RM1181Protege
Yeah, unfortunately I had already tried that as well. In fact, I had another brand new Quest 3 on hand, so I set it up and it does the same thing: fails to load the Scene. I've also tried building with JDK 11.0.2 and JDK 17.0.10. I should also note that my headsets are up-to-date (Runtime v63.0.0.397.363.579007360). Thanks for your suggestions, though.
- DreadHeadFredProtege
Actually, here's an export of my rendering settings. You can import this and try but maybe do an export of your settings first for a backup. You'll need to rename the extension to ".ini". Couldn't attach it with that extension.
- RM1181Protege
FYI, there is a Permissions Granted delegate that allows your app to react to the user's input immediately without having to wait a predetermined amount of time.
- DreadHeadFredProtege
Now you're helping me? Hehe.. Thanks for that. I thought there must be something for it but I had yet to come across any examples. Appreciate it.
- RM1181Protege
Do you happen to be using the Oculus fork? I am using the vanilla install. The documentation made it sound like the fork was not necessary for the MRUK, but maybe some functionality is missing.
- DreadHeadFredProtege
I am, but I also had it working on epics 5.3.2 with the Meta plugin previously. Which sample are you using? Have you tried any other 'scene' sample?
By the way, I implemented your delegate suggestion and it works a charm. Thanks again for that.
- RM1181Protege
I'm using the sample project that comes zipped up in the Utility Kit v63 download. I also added the Meta plugins (MetaXR and MRUK) to a brand new VR Template project, and it behaves the same way (Scene data loads in VR Preview and PCVR, but not with APK). I tried rolling back both plugins to v62, and still the same behavior. Permissions seem to be fine; Unreal just fails to load the Scene data. I have not had the need to debug an APK on the headset before, so that is a bit new to me. Haven't really figured out where to find the relevant information that might explain the load failure.
Glad the delegate helped! I modified mine slightly to let it work with VR Preview. It was hanging at the delegate because the Permissions dialog does not appear while working via Link, so this let it bypass the delegate in VR Preview, which apparently doesn't need permission, probably because "Spatial Data over Meta Quest Link" is enabled in the Oculus client app.
- DreadHeadFredProtege
Super strange man. Yeah, might be time to bring out debugging the headset. Easiest way I've found is to install the developer hub (https://developer.oculus.com/meta-quest-developer-hub/). You probably already know how but just in case, go to the Devices tab and click the Device Logs button on the right and then start the app on the headset. You can filter the logs by the app name and see what's going on. Hope you get some resolution here.
- RM1181Protege
Long story short, it is working now!
I have used the MQDH before and looked at the device logs, but didn't know you could filter by app name, so hadn't found these logs very helpful in the past. So thanks for that!
Using the MQDH device logs and filtering on my app name, I noticed that there was some kind of trust issue with the app, which made me think maybe it was needing to connect to a Meta or Unreal server online. I develop in an environment where the headset is offline. So I went down to our lab, connected it to WIFI, and ran the sample project app and my VRTemplate app. After launching them multiple times, both failed to load the Scene, same as before. Disappointed, I went back to my desk to continue working offline. The headset had lost its Boundary, so I had to create a new one. I launched my test app, and voila, the Scene suddenly loaded. I reinstalled the app to start over fresh and see if I would need to go back to the lab and get online or recreate the Boundary again, but the Scene loaded fine without having to resort to any tricks. So not exactly sure which action fixed the problem, but I'm guessing it was launching the app while connected to the internet. Hopefully my journey here can help some other poor soul out there. 🙂
I appreciate you helping me think through this. It was very helpful!
- DreadHeadFredProtege
Super sweet! That's great. I'm not sure about the connected to internet thing though, but I can comment that sometimes my app on the headset wont even start unless I'm inside my boundary. Doesn't sound like the same issue since your app would start but not load the scene but maybe? Anyhow, good job getting it worked out.
- JunkrecyclerHonored Guest
After requesting permission, add node "launch scene capture" connected to MRUKSubsystem. This will trigger Scene API on OS of the headset and will ask you if you want to modify your space setup. When you return to your app, Spatial related stuff will work without restarting the app. This is not optimal but it works.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 3 years ago
- 3 years ago
- 11 days ago