cancel
Showing results for 
Search instead for 
Did you mean: 

OVRSceneManager - can't query scene

dtaddisF42
Explorer

Hello,

 

I'm trying to get to grips with the scene querying functions, specifically in order to get the known positions of the floor, walls, desk, sofa and windows. I've set them up in the OS on my Quest 2 and I can see them renderered when in the home UI, but my sample app doesn't get any of the info. Instead, in the console I get:

 

[OVRSceneManager] LoadSpatialEntities() OVRPlugin.QuerySpaces() failed.
[OVRSceneModelLoader] LoadSceneModel failed. Will try again next frame.

Spammed again and again. If I run "The World Beyond", available on the Oculus Store it seems to pick up my wall positions well, so I suspect it's something to do with my config, or the version of the package/Unity I'm using. Can anyone help?

 

Here's my setup:

Barebones project with Unity 2021.3.10f1 on Windows 11

Oculus Integration v43.0

Build Settings set to use the VirtualFurniture sample scene

Changed OVRCameraRig to enable passthrough and experimental features

Changed Player Settings to use IL2CPP and build for 64-bit ARM

1 ACCEPTED SOLUTION

Accepted Solutions

dtaddisF42
Explorer

Ok - I got it working!

 

I was just missing the "Anchor Support" tickbox in the OVRManager on the OVRCameraRig. Toggled that on and now the query functions work.

View solution in original post

9 REPLIES 9

dtaddisF42
Explorer

Ok - I got it working!

 

I was just missing the "Anchor Support" tickbox in the OVRManager on the OVRCameraRig. Toggled that on and now the query functions work.

mpv4gb
Honored Guest

Hey, have you posted some code for this anywhere? I'm stuck on querying the scene, and have made sure I have "Anchor Support" enabled.

Do you have the SceneManager script on a gameobject? If so, do you define the Plane or Volume prefabs? Can't get any of my prefabs to set those fields, even though the prefabs have SceneAnchor components.

dtaddisF42
Explorer

Hey. Yeah basically I added Oculus's OVRSceneManager prefab to the scene, and changed the Plane and Volume prefabs to my own versions.

If you want to check that it's working at all, you can load up the test Oculus scene (VirtualFurniture) and see if it populates the environment using your room setup.

pcoutino
Honored Guest

Do anyone knows how to see passthrough video over link? Trying to learn better Scene and Scene Anchor capabilities over PC, everything works except no passthrough video showing on headset. 

When you say "changed the Plane and Volume prefabs to my own versions." do you mean you added a plane and cube or other object to your scene to populate them?

In the OVRSceneManager, it has prefabs set to the list of plane and volume objects it can instantiate (they both seem to have a list of all Room Setup items, it looks like there is some kind of redundancy). I just copied the Oculus prefabs and modified them to instantiate the room items I wanted instead, then set my new prefabs in the OVRSceneManager. You don't need to do this if you just want to see something working with the Oculus prefabs.

If you attach OVRSceneAnchor to a prefab, that's all that is technically required for the prefab to be used with OVRSceneManager prefab slots.

When each anchor resolves, wall planes will be spawned facing inwards to the room.

Hi, I need your help. I am trying to launch the world beyond in Unity editor. It's not working in the editor however If I build in Oculus it works fine. Trying to solve this for the past 2 weeks, still I am unable to solve it.

The errors in unity are :
Failed to initialize Insight Passthrough. Passthrough will be unavailable. Error Failure_NotInitialized.
[WorldBeyondLoader]: LoadSceneModel failed after 5 attempts. Could not load scene model.


xxiongwwei
Honored Guest

Hi, i have already enabled the  Anchor Support in the OVRManager.cs but still cannot load the scene prefabs successfully in Unity editor. I am sure that i had setted the room in my HMD before i link my PC. Could you please give me some advices?