oculus-samples / Unity-Discover

Discover is a showcase of the Meta Quest Mixed Reality APIs. This project demonstrate how to use Passthrough, Spatial Anchors, Scene API, Colocation and Shared Anchors.
MIT License
245 stars 58 forks source link

Issues with Space Boundaries on Quest Pro When Running Unity 2022.3.1 Build #6

Closed sakusan393 closed 1 year ago

sakusan393 commented 1 year ago

Environment

Description

I'm experiencing an issue related to space boundaries on Oculus Quest Pro. Despite having completed the Physical Space setup in the Quest Pro settings, the space boundaries disappear when the content starts, making it impossible to place objects within the space.

Steps to Reproduce

  1. Clone the project from GitHub.
  2. Change the platform to Android.
  3. Select the Discover scene.
  4. Enter the Photon Fusion ID and Oculus/Platform App ID.
  5. Build the APK and run it on Quest Pro.

Expected Behavior

The space boundaries should be visible, and objects should be able to be placed within the content.

Observed Behavior

The space boundaries disappear when the APK is run on the Quest Pro.

Additional Information

sakusan393 commented 1 year ago

Issue Resolved

I've successfully resolved the issue. Following the guidance from this forum post, I added <uses-permission android:name="com.oculus.permission.USE_SCENE"/> to the AndroidManifest.xml. This triggered a confirmation dialog, and as a result, the Space boundaries became active.

Steps to Resolve

  1. Open AndroidManifest.xml in your project.
  2. Add the line <uses-permission android:name="com.oculus.permission.USE_SCENE"/>.
  3. Rebuild the APK and run it on Quest Pro.

This should prompt a dialog for permission, and once confirmed, the space boundaries should function correctly.

kingdomax commented 9 months ago

@sakusan393, I faced the same issue as you did, where my built APK app couldn't detect any scene models (walls, floors, tables, etc.). However, when I run the app directly via Unity's play mode (i.e., Quest Link), it works fine. Thanks to your suggestion, the problem is now resolved.

@AlexThiv, I think this scene permission should be addressed somewhere in the document, as people might further build on top of this project, and I have seen this problem already occurs several times (e.g. #8 #9).

AlexThiv commented 9 months ago

We made an update to set the right permission. Thanks for the info and for solving this. We are also having talks internally on how to surface this better to developers.