Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  3. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  4. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  5. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted Oculus Quest 2 + Mac OS + Unity, show preview mode

Discussion in 'VR' started by level8, Feb 22, 2021.

  1. level8

    level8

    Joined:
    Sep 4, 2020
    Posts:
    3
    Good morning,
    I'm new to the forum, so thanks to whoever will answer my question.
    I tried to make my preview mode in Unity work with my oculus Quest 2, but it seems it is rather difficult, although i tried to follow many guides/tutorial and searched through the forum.

    What i want to achieve:
    As a developer i would like (if possible) to have the preview mode of Unity working directly in the editor with Quest 2, this means that if i click the play button i would like that my app starts and i can use the Oculus Quest 2 Controller + Hands tracking to interact with my application (for example just keeping the Oculus on top of my head in order to be able to change the code and "refresh" the app, without the need of re-deploy to the device).

    What i was able to achieve:
    Oculus is recognized from my laptop, everything works as expected, and i can build and run my application inside the device with no issue. It is just the preview mode that does not work inside Unity.

    The question:
    Is one of you guys able to run the preview mode directly with the Oculus controller? If there is one person that was able to do it i 'd like to know if there are some specific steps to add to get it working. Also, if not, is there any work around?

    This will improve dramatically the dev experience that otherwise is rather slow and not comfortable.

    Just a note, i'm currently using the cable that was shipped with the Oculus to connect the device to my laptop and not the Oculus Link. Might this be the issue?

    Software:
    Mac OS Catalina
    Unity 2019.4.20
    Oculus Quest 2 with the latest update
    All the latest packages from XR + Android.

    Thanks a lot in advance!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,382
    I do Quest 2 development on my Mac, and no, I don't have any such preview mode. When I run within the editor I control my character using mouse/keyboard and/or a game controller (using code I wrote for that purpose).
     
  3. level8

    level8

    Joined:
    Sep 4, 2020
    Posts:
    3
    Thanks Joe, this makes sense. But let's say my application relies A LOT on the hands tracking, like for example capturing gestures, or actual distance among fingers or distance between fingers and other objects, how can you emulate this with custom code? I mean, in general this can be a good-ish approach, but i'd love to see my actual hands in the preview, at least this will speed up "A LOT" the dev process.

    For example the hands position (or hands figure recognition) would not be easy with custom code.

    In general my question comes cause i think is a pretty common use case that would help a lot.

    Anyway, do you know if this possible on Windows? Cause in this case i could potentially switch (with a lot of pain).

    As a side note, i was thinking on a different approach, that is 'casting' oculus, for example with the Developer hub. This will not clearly solve the build/deploy time, but at last i will be able to not constantly switch between device and monitor.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,382
    I think it's possible on Windows, though I'm not certain.

    And yeah, it certainly could be better. I find the builds to the device are quick enough, and I can test enough things in the editor instead, that it's not a major problem for me. But I totally get where you're coming from.
     
  5. Stompy32

    Stompy32

    Joined:
    Nov 4, 2019
    Posts:
    1
    I was trying to do this too because I got tired of having to compile the whole program before I could test something.

    After looking around I found a solution but you won't like it. I used bootcamp and set up everything in windows. Works like a charm so far. (I'm about to switch my whole system to windows and just use that as my dev environment) :-/

    But it would be nice to get native support for this in unity for macOS. In 2021 a lot of macs have video cards that can handle this sort of thing and the software should reflect that.
     
  6. level8

    level8

    Joined:
    Sep 4, 2020
    Posts:
    3
    Thanks for the answers. In the end i found a decent compromise (maybe it is useful for you as well). I have 2 laptops (that's the bad part), in one i have the oculus developer hub, connected with WiFi, and on my mac (my main laptop) Oculus is connected with USB-C cable.

    I just CAST oculus from the developer hub (and also stream the logs) and i develop from my mac. No need to wear the device on anything.

    Hopefully in the future they will add the support for the preview, but till then this works quite decently.
     
unityunity