Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Preview game in Mac M1 Max

Discussion in 'VR' started by MariusEthiel, Mar 10, 2022.

  1. MariusEthiel

    MariusEthiel

    Joined:
    Nov 13, 2021
    Posts:
    17
    Hi guys.
    I'm the proud owner of a new M1 MAX computer, which I use for different tasks in my job and for my hobbies.
    Currently, I'm trying to make it works with Unity and Oculus Quest 2. I can build a simple app with hand recognition and by build + run combination, I can check the game in the device. However, the preview mode (I think that's the name of that feature, when you hit the play button) is not working. Some kind of error related to a missing dll. Reading tons of forums, it seems is not possible in MAC. Is that true?.
    Lack of preview mode is very inconvenient as the workflow is really slow (build + run).
    If preview mode is technically possible, any news about when it's going to be released?.
    Thanks in advance and, as you have probably noticed, I'm not a native English speaker, so sorry if I make mistakes.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,884
    Mac indeed does not support VR (thanks Apple), you either need to sideload Linux or Windows (not sure if BootCamp works, worth a shot). Other than that you can make a VR emulator which runs in-editor. Otherwise you just need to build to the quest
     
  3. MariusEthiel

    MariusEthiel

    Joined:
    Nov 13, 2021
    Posts:
    17
    Thanks for your reply, @DevDunk. About creating a VR emulator... I'm not an expert but that seems to be a huge task for a solo developer, right?.
    I can live with building to the quest for now (it's a hobby, not my real job) and streaming it using ODH is, at least, a partial solution as I don't need to wear the glasses in my forehead to see the code.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,884
    Depends on how your scene is setup. I think most packages (including xr interaction toolkit) have emulators built in with WASD and other keys.
     
  5. MariusEthiel

    MariusEthiel

    Joined:
    Nov 13, 2021
    Posts:
    17
    Hold a second. You are saying that play mode (when play button is hit) indeed works. I got an error about a missing dll.
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,884
    What's the exact error?
     
  7. MariusEthiel

    MariusEthiel

    Joined:
    Nov 13, 2021
    Posts:
    17
    This is the error. Searching on the internet, I think it's an error with the imported packages.
    Code (CSharp):
    1.  
    2. DllNotFoundException: OVRGamepad assembly:<unknown assembly> type:<unknown type> member:(null)
    3. OVRInput+OVRControllerGamepadMac..ctor () (at Assets/Oculus/VR/Scripts/OVRInput.cs:2892)
    4. OVRInput..cctor () (at Assets/Oculus/VR/Scripts/OVRInput.cs:285)
    5. Rethrow as TypeInitializationException: The type initializer for 'OVRInput' threw an exception.
    6. OVRSkeleton.ShouldInitialize () (at Assets/Oculus/VR/Scripts/Util/OVRSkeleton.cs:155)
    7. OVRSkeleton.Update () (at Assets/Oculus/VR/Scripts/Util/OVRSkeleton.cs:332)
    8.  
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,884
    Can't you simply play further and ignore it or does it shut down?
     
  9. MariusEthiel

    MariusEthiel

    Joined:
    Nov 13, 2021
    Posts:
    17
    I just tested it. I can "work" (in quotes because I don't know the future issues that this error may cause), just created a Script to move the camera. After reimporting the package, I can move the camera, but the error is still there.
    Thanks for your help, @DevDunk
     
    DevDunk likes this.
  10. aaldere1

    aaldere1

    Joined:
    Apr 6, 2021
    Posts:
    6
    I get this same exact error in Play Mode - it works but just spits out that error over and over. I've looked at all the settings and things seem fine. Not sure what the deal is.
     
  11. MariusEthiel

    MariusEthiel

    Joined:
    Nov 13, 2021
    Posts:
    17
    Import the packages again, it worked in my case
     
  12. dormouse

    dormouse

    Joined:
    Mar 1, 2011
    Posts:
    82
    exactly same issue here!
    DllNotFoundException: OVRGamepad assembly error when play in Unity. Any solution ?
    thx
     
  13. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    260
    Last edited: Oct 15, 2022
  14. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,884
    No, this would probably be an apple thing, not even meta.
    No VR headset runs on mac and I don't think there is VR support in metal yet (but not sure)
     
  15. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    260
    You misunderstand, we just want the game to play in the editor (with mouse and keyboard controls), not the headset. This is surely possible on Mac.
     
    MariusEthiel likes this.