Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. 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.

Official Introducing Meta Quest Support in AR Foundation

Discussion in 'AR' started by KevinXR, Jun 20, 2023.

  1. jtran

    jtran

    Joined:
    Jun 20, 2013
    Posts:
    7
    I need the room mesh and collision for mixed reality experiences. Room planes works for simple stuff but if you want to do anything involving the actual room then we'll need the room mesh. I'd say room mesh and persistent anchors are the two most important things that MR needs. I will eventually need shared anchors too but that's as priority.

    Do you have an ETA when we will get these features?
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
  3. apexmannusingh

    apexmannusingh

    Joined:
    Nov 12, 2020
    Posts:
    2
    Hey. Is the runtime plane detection still not available? If no is there any way to enable room setup directly from the Unity application itself?
     
  4. cubaschi

    cubaschi

    Joined:
    Oct 23, 2012
    Posts:
    52
    But is it correct that the manifest doesn't feature Eureka or Quest3?

    <meta-data
    android:name="com.oculus.supportedDevices"
    android:value="quest|quest2|cambria" />
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    @apexmannusingh This is how Meta's OpenXR API is designed. It relies on scene capture as the source of information about your space and does not scan for features while your app is running. So yes unless Meta changes things, this is how it will work for the foreseeable future!

    Yep! https://docs.unity3d.com/Packages/c....0/manual/features/session.html#scene-capture
     
  6. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    @cubaschi I don't know actually. This is handled by another team. We just got our order of Quest 3's though, so we should be able to respond within a week or two with updates from our production models.
     
    cubaschi likes this.
  7. eswara

    eswara

    Joined:
    Mar 25, 2021
    Posts:
    3
    I see that this provides support for Anchors. Is it possible to use this via Editor/windows or only works when run on device?
     
  8. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    @cubaschi

    Our OpenXR team is looking into the manifest issue. Thanks for letting us know. In the meantime they shared a workaround that allows you to add Quest 3 to the manifest yourself. This might help?

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEditor;
    5. using UnityEngine.XR.OpenXR;
    6. using UnityEngine.XR.OpenXR.Features.MetaQuestSupport;
    7.  
    8. public class addDevice : MonoBehaviour
    9. {
    10. #if UNITY_EDITOR
    11.     [InitializeOnLoadMethod]
    12.     static void AddSomeDevices()
    13.     {
    14.         OpenXRSettings androidOpenXRSettings = OpenXRSettings.GetSettingsForBuildTargetGroup(BuildTargetGroup.Android);
    15.         if (androidOpenXRSettings == null)
    16.             return;
    17.        
    18.         var questFeature = androidOpenXRSettings.GetFeature<MetaQuestFeature>();
    19.  
    20.         if (questFeature != null)
    21.         {
    22.             questFeature.AddTargetDevice("quest3", "Quest 3", false);
    23.         }
    24.     }
    25. #endif
    26. }
     
  9. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    Just trying to get quest 3 working with this package (and no OVR), and it simply doesn't work. Getting this bug; https://issuetracker.unity3d.com/is...-lost-when-player-is-built-with-google-arcore
    along with other issues.

    There's no official sample project?
    Please consider making one. It'll take you 1 hour when you know which project config works, instead of developers trying to debug package and project config issues.
     
  10. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
  11. peterhou_dk

    peterhou_dk

    Joined:
    Jul 18, 2021
    Posts:
    2
    I ran into the same issue with planes not showing up on Quest 3. Unfortunately, adding Quest 3 to the manifest did not fix the problem. I’m using the mixed reality template with no code changes other than the script above and the room has been setup. Any other ideas how to fix this issue?
     
  12. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    Yes, this is what I've been doing (not using ARCore, I've still gotten that error).

    Also, did try the MR sample and followed the guidelines you linked previously - and just tried again from scratch. Same issue, just a black screen and 3 dots loading. I'm not even getting a splash screen.

    Here's the log;
    https://pastebin.com/1w3Q4EaV

    Also, what's most interesting is that the app doesn't close when exiting from within the headset. It's still running in background according to Meta Quest Developer hub. I've never seen this behaviour before on a quest device.
     
    Last edited: Nov 6, 2023
  13. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    After stopping the app from the developer hub and restarting i get native crash on every launch.
    upload_2023-11-6_10-2-56.png

    Attached tombstone;
     

    Attached Files:

  14. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    Alright, seems like it's vulkan related. Build worked after downgrading Meta OpenXR package to 0.1.2 and using openGL. Upgrading back to 1.0.0 (but without reenabling all the Meta features) and using openGL works.
     
  15. emartino

    emartino

    Joined:
    Mar 1, 2019
    Posts:
    5
    Hello. Are you planning to have support for image or object detection? If so, when?
     
  16. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    So far it's been going okay-ish with OpenGL, however, we're still getting;

    Skipped rendering frame because GfxDevice is in invalid state (device lost)

    On startup. Sometimes it disappears after a while. Sometimes going back and forth between the os (minimizing the app) works. Sometimes nothing helps and the message is spammed.

    Changing to Vulkan still just doesn't work at all.

    Edit. Added OpenXr diagnostics output.
     

    Attached Files:

  17. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    @TheVirtualMunk do you have the AR Feature enabled in your Project manifest / Package Manager? This issue is most commonly associated with this configuration. Removing the AR Feature and re-adding the AR-related packages one at a time seems to fix this issue for most people. Let us know how you get on-- I've never seen this issue reported on Quest, so this is an interesting case.
     
  18. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
  19. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    The AR feature is not enabled. Only "Engineering". This is a fresh MR Sample Template. All i did was follow the setup instructions. This is unity 2022.3.12f1.
     
  20. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    @TheVirtualMunk Hmm I can't really add any further value via the forum. Please file a bug if you haven't yet: https://unity3d.com/unity/qa/bug-reporting

    We are aware of an issue with the Vulkan driver on Quest 3 and have reported the issue to Meta, but I don't know anything about "GfxDevice in an invalid state" on Quest 3 OpenGL.
     
    TheVirtualMunk likes this.
  21. jtran

    jtran

    Joined:
    Jun 20, 2013
    Posts:
    7
    Hey @andyb-unity and @KevinXR do know when we'll get access to room mesh from the Quest 3 depth sensor?
     
  22. EvoZ1310

    EvoZ1310

    Joined:
    Nov 8, 2020
    Posts:
    1
    Hey @andyb-unity , when can we expect shared Spatial Anchors to be integrated? Local Anchors for current Session are working already, but I cant load saved Anchors for a specific room as it was possible with OVRSpatialAnchor..
    Until then I still have to go with Oculus XR Plugin.
     
  23. KevinXR

    KevinXR

    Unity Technologies

    Joined:
    Jan 19, 2023
    Posts:
    24
  24. KevinXR

    KevinXR

    Unity Technologies

    Joined:
    Jan 19, 2023
    Posts:
    24
    andyb-unity likes this.
  25. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    Hi, the roadmap mentions support for application space warp as released, not stating which version of Unity, though. Does it mean it’s now usable without the hack URP branch of Meta, but with some official Unity release? If yes, from which version on?
     
    madrobotMK likes this.
  26. jtran

    jtran

    Joined:
    Jun 20, 2013
    Posts:
    7
    Hey @KevinXR, thanks for you response. I appreciate the update. Please let us know when the next updates drop.
     
    KevinXR likes this.
  27. KevinXR

    KevinXR

    Unity Technologies

    Joined:
    Jan 19, 2023
    Posts:
    24
    Hey @Qleenie, the work we did for space warp enables this feature through the OpenXR plugin (previously it only worked via the Oculus XR plugin). It still requires Meta's fork or URP.
     
    andyb-unity and Qleenie like this.
  28. JoergHofmann74

    JoergHofmann74

    Joined:
    Oct 31, 2017
    Posts:
    17
    Hi @KevinXR will you please keep us updated here in regards of Shared Spatial Achorsas they are not only a priority for you, but us, too ;)
    Thanks for the cool MR template guys - it really rocks
     
    KevinXR and andyb-unity like this.
  29. DirtyLeon

    DirtyLeon

    Joined:
    Jan 16, 2019
    Posts:
    3
    Hello, I'm trying the ARFoundation Image Tracking on my Quest 3 but it's a no dice, the AR Passthrough is working just fine though. Has anyone faced the same issue with the Image Tracking?
     
  30. JoergHofmann74

    JoergHofmann74

    Joined:
    Oct 31, 2017
    Posts:
    17
    Hi DirtyLeon,
    Image tracking is not supported on the Quest3-
     
    DirtyLeon likes this.
  31. DirtyLeon

    DirtyLeon

    Joined:
    Jan 16, 2019
    Posts:
    3
    I see, thanks for the info!
     
  32. m0nkeybl1tz

    m0nkeybl1tz

    Joined:
    Feb 10, 2013
    Posts:
    35
    Hey sorry, I think you've answered similar questions 100 times, but just to clarify for my own sanity: is it correct that there is no way to automatically acquire tracking targets (i.e. plane detection, image detection, etc.) at runtime? And that likely there never will since Meta doesn't support it?
     
  33. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    We can only support what Meta supports. Meta currently does not support image tracking at all, nor do they support dynamic detection of planes at runtime. Maybe that will change in the future. We don't know. Right now this is how it works.
     
  34. m0nkeybl1tz

    m0nkeybl1tz

    Joined:
    Feb 10, 2013
    Posts:
    35
    Ok, makes sense thanks!
     
  35. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
  36. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    @andyb-unity Are there any plans to implement meshing?

    I know it works the same as the planes (they're created in the scene setup and are thus static at runtime), but we still need it. One of the main reasons we want to use this package is so we don't have to rely fully on the OVR capabilities.

    Is there a roadmap for which OVR features have consciously decided to be or not be included in this OpenXR package?
     
  37. KevinXR

    KevinXR

    Unity Technologies

    Joined:
    Jan 19, 2023
    Posts:
    24
    andyb-unity and TheVirtualMunk like this.
  38. josephtmeyer

    josephtmeyer

    Joined:
    Jan 8, 2024
    Posts:
    3
    PUT THIS IN YOUR DOCUMENTATION
    docs.unity3d.com/Packages/com.unity.xr.meta-openxr
    or
    docs.unity3d.com/Packages/com.unity.xr.arfoundation

    Known incompatibility, 6 month old forum post acknowledging it
    "1.0 released" 2 months ago

    It seems pretty straightforward to list what the requirements are, especially when there's a project setup page on the docs
     
  39. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
  40. CyborgGames

    CyborgGames

    Joined:
    Mar 2, 2017
    Posts:
    15
    Please tell me, can i getting geolocation data in Unity on Meta Quest 3? When I was testing, I was able to get permissions to read geolocation data. But, in the application, the geolocation service is endlessly going initialization...
     
  41. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    CyborgGames likes this.
  42. kingdomax

    kingdomax

    Joined:
    Oct 20, 2021
    Posts:
    2
    Greetings, Unity dev.
    I have questions regarding current limitations with Quest Link and spatial anchors:

    1) While we await Quest Link support, is it possible to use XR Simulation for testing within the Unity Editor? Specifically, I'm interested in testing the creation of spatial anchors within a simulated environment plane. https://docs.unity3d.com/Packages/c...manual/xr-simulation/simulation-overview.html

    2) In the absence of built-in support for persistent spatial anchors and shared anchors, are there any naive approaches to enable shared anchors over a network for users within the same physical space? A potential workaround I'm considering involves two users creating spatial anchors at an identical physical point within a room, thus allowing both to utilize this as a reference point. Basically, I would like to prototype an app that emulates behavior similar to Meta's colocation package. https://developer.oculus.com/documentation/unity/unity-learn-mixed-reality-through-discover/

    Thank you and have a nice day.
     
  43. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    Got this answer in a support ticket last week;

    Regarding your question about using XR Simulation Environment together with Meta Quest Link, it is not possible for these two to work together because XR Simulation Environment works by simulating an XR headset and environment within the editor, however Meta Quest Link allows you to test within the actual headset. The environment information will be taken from the Room Setup information (the real-world environment) stored on the headset when using Meta Quest Link. The AR Foundation package currently does not support using Meta Quest Link, support for this is expected to release later this year.

    I guess the main reason is that the XR providers are "global device" providers and not per feature (which I guess makes sense in 90% of instances). What would make more sense in this case is the ability to choose which provider you want to use for each feature. So headset and hand tracking through Link, but anchors and plane finding through the XR simulation provider. My guess is they are either working on that or (more likely) working on passing all of that information over Meta Quest Link. However, both capabilities seems valuable (the first for testing in different environments especially).
     
    kingdomax likes this.
  44. kingdomax

    kingdomax

    Joined:
    Oct 20, 2021
    Posts:
    2
    Maybe I didn't emphasize well in the question. I mean, no need Quest Link at this point but is it possible just trying to test in editor with both XR Simulation and XR Device Simulator.
     
  45. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    Great question! This is a big topic across the XR team right now. Today, the answer is "kind of. we're working on it." XR Simulation and XR Device Simulator were developed independently by different teams, and unfortunately it shows! There are some limitations if you try to use both at the same time, and we are currently working on bringing these two products into a more harmonious existence.

    But yes each of them should work independently, and you can definitely use XR Simulation in a project that builds for Meta Quest.

    We are also making continued progress on supporting Quest Link, but no release dates to share quite yet.

    If your app requires shared anchors, you are likely best off using Meta's Interaction SDK (formerly known as the Oculus Integration Asset).
     
  46. fooldome

    fooldome

    Joined:
    May 29, 2012
    Posts:
    9
    Is it possible to Scale XROrigin but not to affect the rooms mapped and tracked AR planes for Anchor placement?

    I'm using the Quest Pro, I have a scene that can be placed - on lets say a floor, and I have to scale the XROrigin to scale the scene. But if I want to then reposition the scene - on lets say a desk, and I've scaled the scene, then the tracked planes for walls and furniture have scaled as well, making precise placement impossible.

    So is there anyway to uncouple the AR tracked planes scale from the XROrign and Camera scale, so that room size and planes are constant?
     
  47. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    @fooldome I believe the answer to your question is no, we don't support this. Can you help me understand what you are trying to do?

    You have a scene, that is a miniature version of the room you are also standing in? And you want to render that scene on a desk. But you also want to be able to raycast against the walls of your room at their original scale? I think you could accomplish this without scaling the XR Origin if I'm understanding you correctly.
     
  48. fooldome

    fooldome

    Joined:
    May 29, 2012
    Posts:
    9
    Imagine the scene is just a cube attached to anchor that can be raycast and physically placed anyway, like in the Anchor demo. I need to scale XROrigin to scale the cube. Then at different scales still raycast the physical space and place it anyway, and for it to scale at that position.

    The reason I can't just scale the cube directly, is within the cube I have moving boats that are camera tracked, and water simulation that under no circumstances can be scaled. Best solution I've got so far is returning XROrigin localscale to 1 for placement, but scaling still creates unexpected results, as all the AR tracked planes in the room are scaling with it. Seems the ability to to raycast against walls at their original scale with XROrigin at a different scale is simply not possible? :(
     
  49. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,178
    This is correct. All AR Features share the same scale as the XR Origin.

    One thing you could possibly try is this:
    • Enable plane detection
    • Create wall GameObjects at the scale of all the walls in your room, but not parented to the ARPlane GameObjects that ARPlaneManager creates
    • Disable plane detection by disabling the ARPlaneManager. This will also deactivate all the ARPlane GameObjects
    • Use Physics.Raycast to raycast against your wall GameObjects
    I'm not sure what the needs of your scene are but if you don't need your walls to be managed by ARPlaneManager then you could just treat them as regular GameObjects.
     
  50. fooldome

    fooldome

    Joined:
    May 29, 2012
    Posts:
    9
    @andyb-unity That's a clever workaround, really appreciate the suggestion.
    Transitioning to ARfoundation and dealing with meta limitations for AR on a headset really presents some interesting challenges. Excited to give this go. Many Thanks
     
    andyb-unity likes this.