Search Unity

Official Oculus XR Plugin 1.7.0-preview.1 available

Discussion in 'VR' started by jj-unity, Dec 3, 2020.

  1. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    74
    Oculus XR Plugin 1.7.0-preview.1 is now available. It supports Unity 2019.4 and higher. The big changes are support for v23, including Phase Sync on Quests.

    Note: your devices need to be on the v23 runtime in order to support projects built with this version of the Oculus XR Plugin.


    Added
    • Added `Phase Sync` option on Android. This enables a latency optimization technique which can reduce simulation latency by several ms, depending on application workload. This is currently disabled by default, but we encourage trying it with your projects
    • Added Unity Profiler marker for `OculusRuntime.WaitToBeginFrame` to clarify time spent waiting for frame sync.
    Changed
    • Updated to Oculus plugin 1.55.0
    • Updated AudioSpatializer plugins to 1.55.0
    Removed
    • Removed `Focus Aware` option since it's now always on by default
    • Removed `Protected Context` option since it only applied to Go
     
  2. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    hello jj-unity. I've been bashing my head against oculus/unity integration since the morning. First, the only way I could get it to stop giving me conflict errors between
    Packages\com.unity.xr.oculus.android@2.38.6\Editor\Unity.XR.Oculus.Editor.asmdef
    and the non android was, was to copy them into my project packages directory, and rename one of the compilations (the non android one). If I tried to rename the android one, unity spent hours trying going through 'iterations' of import, and not getting anywhere.

    Now, it looks like something has settled, and even thought I installed the latest oculus integration, no where does it say on the oculus integration installation steps
    https://developer.oculus.com/downloads/package/unity-integration/
    that I have to update the package manager package as well.

    So i tried a bunch of things and finally noticed that if i 'view all versions', I do in fact see
    https://docs.unity3d.com/Packages/com.unity.xr.oculus@1.7/manual/index.html
    which does in fact include the long sought after "Phase Sync" feature.

    But no matter what I do, I can't install it. I am stuck on 1.6.1. I have tried deleted/removing/clearing it from cache - it just pops back...with no available button to upgrade to 1.7

    I'm on the recommended
    Unity 2019.4.16f1 (LTS) version.

    Right now, after deleting, clearing, rebooting, now it is letting me choose update.

    Now it went through a bunch of import iterations again, this time finished, and landed me back on conflict error:

    "Assembly with name 'Unity.XR.Oculus.Editor' already exists (Packages/com.unity.xr.oculus.android/Editor/Unity.XR.Oculus.Editor.asmdef)"
    "Assembly with name 'Unity.XR.Oculus.Editor' already exists (Packages/com.unity.xr.oculus/Editor/Unity.XR.Oculus.Editor.asmdef)"

    So now i'm forced once again to pull these packages out of the cache, into the project (so i can edit them), and chance the non android one to any other name (hoping doing so doesn't break other stuff)


    ... what am i doing wrong? Please help :)
     
  3. contempt

    contempt

    Joined:
    Jul 31, 2012
    Posts:
    88
    I'm also having issues with the update. After updating Oculus XR plugin to 1.7.0-preview-1 (Had to restart editor for it to show in Unity 2020.1.9f1) I get conflicts with Oculus Spatializer that Oculus Integration package v.23 also updated via package manager.
    I get this error in console:
    GUID [9fcc25xxxxxxxxxxxx656c3c524b] for asset 'Packages/com.unity.xr.oculus/Runtime/AudioPluginOculusSpatializer.bundle' conflicts with:
    'Assets/Oculus/Spatializer/Plugins/AudioPluginOculusSpatializer.bundle' (current owner)
    We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

    Edit: So I got it working. I restarted the editor again after I had updated all the Oculus plugins via Package Manager and when I get the prompt to update the Oculus Spatializer plugin I hit the REMOVE button.

    I then got this message in console and deleted the AndroidUniversal folder in Assets>Oculus>VR>Plugins>1.55.0>:
    Found plugins with same names, Assets/Oculus/VR/Plugins/1.55.0/AndroidUniversal/OVRPlugin.aar and Assets/Oculus/VR/Plugins/1.55.0/AndroidOpenXR/OVRPlugin.aar. Delete the one of the duplicate plugins.

    UnityEditor.AndroidPluginImporterExtension:CheckFileCollisions(String)

    UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
     
    Last edited: Dec 8, 2020
  4. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    ..I got it mostly working but there are soo many issues.

    1. I can't get any latency/motion to photon values through the code
    2. fixedFoveatedRenderingSupported is returning false (i'm not using vulkan)
    3. even the quest overlay isn't able to show predicted amount

    .... all I want is phase sync, and yet now i'm forced to switch so much code to XR, a system which seems pretty broken so far.

    oh..and I just built again, and now there are is no haptics firing...
     
  5. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    74
    I'll look into these issues today. The spatializer issue is a known issue that will be fixed in .preview-2, which is in the works. Basically, the arm64 version of the spatializer has a conflicting .meta file GUID with the Oculus integration asset. I've fixed this in .preview-2. I'll look into the remaining issues today.
     
    GnomeisIdle likes this.
  6. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    additionally,

    if i try to change the phase sync via:
    adb shell setprop debug.oculus.phaseSync


    then I often get non stop

    12-09 01:33:55.377  2158  2447 W VrApi   : ovr_SubmitFrameInternal: FrameIndex discontinuity: Expected 399494, Received 399504
    12-09 01:33:55.389 2158 2447 W VrApi : ovr_SubmitFrameInternal: FrameIndex discontinuity: Expected 399505, Received 399516
    12-09 01:33:55.400 2158 2447 W VrApi : ovr_SubmitFrameInternal: FrameIndex discontinuity: Expected 399517, Received 399528
    12-09 01:33:55.411 2158 2447 W VrApi : ovr_SubmitFrameInternal: FrameIndex discontinuity: Expected 399529, Received 399540
    12-09 01:33:55.422 2158 2447 W VrApi : ovr_SubmitFrameInternal: FrameIndex discontinuity: Expected 399541, Received 399552
     
  7. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    also, this is still happening - I am forced to pull the packages into the project (from the cache), and adjust the names
    upload_2020-12-9_13-54-1.png
     
  8. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    hope it's ok to keep piling up here, but this is related:
    for the VRTemplate, the XR settings Virtual reality supported is greyed out. In my project (same unity version) it isn't. What do i do to make it greyed out (as whenever it gets enabled, VR just doesn't work...and i don't know what is enabling it)
    upload_2020-12-9_15-7-55.png
     
  9. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    ok got the above sorted, when pulled into my project, the android oculus xr, and renamed it

    Now i'm stuck with 2 showstoppers:

    1. nothing i do besides ADB commands can change foveation level
    2. haptics are gone.


    InputDevices.GetDevicesWithCharacteristics(
    rightController ? InputDeviceCharacteristics.Right : InputDeviceCharacteristics.Left, devices);

    foreach (var device in devices)
    {
    device.TryGetHapticCapabilities(out HapticCapabilities cap);
    if (cap.supportsImpulse)
    {
    device.SendHapticImpulse(0, power, duration);
    }

    }




    devices has my controllers correctly, and supportImpuse returns true..and yet nothing.
    Meanwhile, same code works fine on pc (oculus link)
     
  10. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    74
    We did change haptics behavior, so I can totally see there being an issue here. We didn't make any changes in 1.7.0-preview.2 for that, so it likely won't fix anything, but I'll add it to the list of things to address.
     
  11. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    74
    This one means that you have both the old integrated Oculus Android package installed as well as the new Oculus XR Plugin. Normally we automatically prevent both from being installed at once, but that didn't work for some reason in your project.

    You'll want to go into the Package Manager and `Remove` the `Oculus Android` package, as well as the `Oculus Desktop` package if it's there.

    upload_2020-12-10_1-10-56.png
     
  12. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    I thought i tried to do that earlier, but just deleting all of them..yea i definitely did, and they all came back by themselves.
    Now i tried, and it seems to have stuck for some reason. Oh well.

    So now just haptics/foveated rendering support...
    and some 2d elements in my scene are flickering? Is this a known issue as well? If not, I'll be happy to share a reproduction example.

    EDIT: could the existing (albeit package renamed) android stuff have messed up with haptics on android?
     
  13. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    yep..i found the reason. It's really silly, but apparently the Oculus Integration v23, has an ovrplugin.aar file set for android.....but so does
    Library\PackageCache\com.unity.xr.oculus@1.7.0-preview.2\Runtime\Android\OVRPlugin.aar

    ...and

    1. i'm not sure how they don't clash on build
    2. unchecking android for the integration's plugin, makes XR haptics, and ovrplugin foveation work
     
  14. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    74
    Interesting. I'll investigate what's going on here, because the .aars in 1.7.0-preview.x and the v23 integration should be the same. Glad you figured it out, and I'll look into what's going on here.
     
  15. lmartellmc

    lmartellmc

    Joined:
    Aug 3, 2018
    Posts:
    23
    I'm also trying to get haptics working after upgrading, but I'm just on 1.6.1 with Oculus Integration 23.1

    @carrotstien What were you able to turn off to make haptics function on Quest?
     
  16. Alex_Heizenrader

    Alex_Heizenrader

    Joined:
    May 16, 2019
    Posts:
    95
    The OVROverlay is not working on Quest builds, I am wondering why this might be and if its related to new versions (I have all latests packages in 2019.4.15f1)
     
  17. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    @lmartellmc , I had to remove/disable the ovr plugin that comes with the oculus , and use the one that came with XR
    then I had to use the XR haptics, not the ovr plugin.

    @Alex_Heizenrader , I concur. The lack of OVR overlay, and a few others things are really holding us back. I am trying to code around it, but it'd really be helpful it just worked as before. @jj-unity , any idea when we could expect this to be functional?
     
  18. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37
    any update on these issues? There are some other problems preventing us from pushing this to users related to guardian/resetting/stage -based-tracking
     
  19. carrotstien

    carrotstien

    Joined:
    Jun 8, 2016
    Posts:
    37