Oculus Unity Integration - v1.38 (06/21/19) — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Oculus Unity Integration - v1.38 (06/21/19)

NinjaGaijinNinjaGaijin Posts: 209 Oculus Staff
edited June 21 in Unity Development

Version 1.38 of our integration for Unity has been released!

The Oculus Integration for Unity package adds scripts, prefabs, samples, and other resources to supplement Unity’s built-in support. The package includes an interface for controlling VR camera behavior, a first-person control prefab, a unified input API for controllers, advanced rendering features, object-grabbing and haptics scripts for Touch, debugging tools, and more. For more information, see our Unity Getting Started Guide.

You can grab the latest version of our Unity Integration here (through the Unity Asset Store): https://assetstore.unity.com/packages/tools/integration/oculus-integration-82022

More information, as well as general known issues with Unity, about this release can be found here.

New Features

Integration Changes

  • Updated the Oculus Unity Integration to 1.38, including:
    • Updated the LipSync integration to 1.38
    • Updated the Audio Spatializer to 1.38

API Updates

  • Breaking change: the OVROverlay prefab now requires an instance of the OVRManager prefab to be present. Apps that wish to update to 1.38 or later may be required to add OVRManager.
  • Renamed the TiledMultiRes setting to FixedFoveatedRendering.

Known Issues

All Unity 2018.2 versions

  • (Mobile) You'll need to either switch the AndroidBuildSystem to internal or export a Gradle project and modify the SigningConfig in the build.gradle file to include v1SigningEnabled=true, v2SigningEnabled=false.

2018.2.20f1

  • (Mobile) Some game objects may appear darker when loaded in 2018.2.20f1. To work around this issue, load the project in another version of Unity, like 2018.2.19.

Other Known Issues

Please read the release notes in their entirety here: https://developer.oculus.com/downloads/package/unity-integration/

The thread for the previous version (v1.37) can be found here: https://forums.oculusvr.com/developer/discussion/75863/oculus-unity-integration-v1-37-05-21-19
If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
2. Please submit a ticket here (include what you've gathered in step 1).
3. Tag me @NinjaGaijin once you have done so!

Comments

  • DarkTableDarkTable Posts: 3
    NerveGear
    edited June 21
    Fixed Foveated Rendering (FFR) is broken in the lightweight render pipeline (LWRP) for Oculus Quest. Is this a known issue?
  • DarkTableDarkTable Posts: 3
    NerveGear
    Also, there's a bug in GetOculusProjectConfigAssetPath() if you have spaces in your path.

    Line 55 should be:
    // Because spaces become %20 in Uris
    return Uri.UnescapeDataString(relativeUri.ToString());
  • FretBuzzBoogieFretBuzzBoogie Posts: 3
    NerveGear
    GearVR Unity 2018.2.20f1

    On upgrading from v1.37 to v1.38, while trying standalone on editor I have lost the emulator support, then I checked in OVRManager.cs Line 1297
    if (OVRPlugin.initialized || (Settings.enabled && Settings.loadedDeviceName == OPENVR_UNITY_NAME_STR))

    I get OVRPlugin.initialized = false and Settings.loadedDeviceName  = "", so OVRManager is never initialized.

    Also, the IAP bug is not yet fixed.
    You cannot purchase two items. On second purchase when IAP item is selected and the window goes to oculus home to purchase the item, the window transitions back to the game without the callback being called.
  • tyounanmotityounanmoti Posts: 3
    NerveGear
    Not worked on Unity 2019.1.4f1 and 2018.3.13f1 with following warning log.

    Virtual Reality SDK Oculus failed to initialize.
    Will attempt to enable None instead
  • DarkTableDarkTable Posts: 3
    NerveGear
    This is going to sound really nit picky, but I noticed that some of the files in the SDK are indented with spaces, some are indented with tabs, some have brackets on the same line, some have brackets on a newline. OculusPlatformSettingsEditor.cs is even indented with 2 spaces!

    Can you guys just have a coding style battle royale and unify on something, please?

    (You probably didn't even know you were eating lunch next to someone who indents using spaces.)
  • huangjunhuangjun Posts: 11
    NerveGear
    Is there any infomations about body tracking & share space?
  • AbnormaliaAbnormalia Posts: 162 Oculus Start Member
    Are you guys going to fix editor "Virtual Reality SDK Oculus failed to initialize" BUG or is there some workaround for now ?
  • preston.mccauleypreston.mccauley Posts: 40 Oculus Start Member
    I'm using the new build, when I deploy to my device it looks like my developer build is running (using the same distance grab scene) I get the loading dots, then it just crashes back to home... - anyone get this working yet?
  • AbnormaliaAbnormalia Posts: 162 Oculus Start Member
    edited June 25
    Unity (2019.1.8f) Create New 3D project, Integrate 1.38 - Runs fine
    Switch Platform to Android, Run not working, no tracking, no Unity in headset (Oculus CV1)
    Switch Platform back to windows - Not working, same as above

    Which is most stable version for quest development until its fixed ?

  • rayBLAST-RrayBLAST-R Posts: 3
    NerveGear
    Not worked on Unity 2019.1.4f1 and 2018.3.13f1 with following warning log.

    Virtual Reality SDK Oculus failed to initialize.
    Will attempt to enable None instead

    I've been having the same issue on Unity 2019.1.8f1. However, it was running just fine for a while on Tuesday... I think it was Tuesday. I didn't change a thing but the SDK v1.38.0 was showing up in console as it should. Now I am seeing what is in the attached screenshot. 

    In any case, I have included OpenVR and Unity will fallback to that for running in the Editor. This will allow you to continue development at least. If using a LocalAvatar, the finger animations will not match the controller. 

    This particular project is setup for Quest and I have been using my Rift S for checking progress. This has not caused any issues with building and pushing an APK to the device. 

    @NinjaGaijin
     Any ideas on why the SDK is intermittently initializing? I've noticed others having this issue too.


  • rayBLAST-RrayBLAST-R Posts: 3
    NerveGear
    Not worked on Unity 2019.1.4f1 and 2018.3.13f1 with following warning log.

    Virtual Reality SDK Oculus failed to initialize.
    Will attempt to enable None instead

    I've been having the same issue on Unity 2019.1.8f1. However, it was running just fine for a while on Tuesday... I think it was Tuesday. I didn't change a thing but the SDK v1.38.0 was showing up in console as it should. Now I am seeing what is in the attached screenshot. 

    In any case, I have included OpenVR and Unity will fallback to that for running in the Editor. This will allow you to continue development at least. If using a LocalAvatar, the finger animations will not match the controller. 

    This particular project is setup for Quest and I have been using my Rift S for checking progress. This has not caused any issues with building and pushing an APK to the device. 

    @NinjaGaijin
     Any ideas on why the SDK is intermittently initializing? I've noticed others having this issue too.



    So to just follow-up: the issue has once again resolved itself. Not sure why, but all functionality has returned. I verified the original issue in Unity 2018.4.2f1 as well. I created another project in Unity 2019.1.7f1 and everything seemed fine. Then I reopened the original project again in Unity 2019.1.8f1 and the SDK is initializing. 



    @ NinjaGaijin 
    Any incites you can possibly offer in terms of root cause would still be very much appreciated in case this behavior continues. 

  • AbnormaliaAbnormalia Posts: 162 Oculus Start Member
    I also figured out temp fix to add OpenVR, but there should be some official fix for that.
  • rocketchickenrocketchicken Posts: 1
    NerveGear
    1.38 seems to break OVRHeadsetEmulator. This conditional is never set in OVRManager.cs:

    if (OVRPlugin.initialized || (Settings.enabled && Settings.loadedDeviceName == OPENVR_UNITY_NAME_STR))
    {
    InitOVRManager();
    }

    Is there something else we should be doing in the setup that's not described in the documentation?
  • KuboldKubold Posts: 119 Oculus Start Member
    edited June 30
    I created a completly new project in Unity 2018.4.3f1 (the recommended version), in LWRP.
    Imported Oculus (Desktop) from package manager - works fine.
    Imported Oculus integration 1.38 - "Virtual Reality SDK Oculus failed to initialize".

    Some of you wrote "it fixed itself somehow, don't know how, but it did". I have no such luck.
  • jstarrdewarjstarrdewar Posts: 13
    NerveGear
    We are having trouble with OVRCameraRig. Sometimes, on some people's computers, the anchor points are not getting updated.
  • JoshuaGrassJoshuaGrass Posts: 2
    NerveGear
    Like jstarrdewar, I am also having real issues with the OVRCameraRig not updating anchors correctly.  It is very simple to reproduce.  Build Oculus/VR/Scenes/Room and you will see the following behavior:
    - Only one of the hands is visible (LeftHandAnchor or RightHandAnchor)
    - The other hand is positioned at the TrackingSpace position (so it will often be invisible, but will show up if you pull your head back)
    - The visible hand will switch if you press any button on the controllers
    - Pushing the right stick forward will move you forward a small amount but won't do it continuously
    - Left stick rotation no longer works

    I have tried:
    - Factory resetting my Quest
    - Removing the oculus asset store package and re-downloading
    - Starting brand new projects that are nothing but the Oculus integration package

    All these things worked fine last week.

    All store software still works fine.  Unfortunately I don't have an archived apk from last week to test against.

    To me, it feels like something in the low level of OVRInput is throwing an exception.  But that's is just a guess - I don't get any exceptions when I attach the debugger to the Room project, but I think it's too low level.
  • wwwCicaedawwwCicaeda Posts: 8
    NerveGear
    When was the last time someone took a look at OculusSpatializerUnity.cs?
    The dynamic room modeling feature appears to be completely broken. As far as I can tell, the raycasting is hardcoded to emit from world position 0,0,0 rather than the player position. I tried re-hardcoding it myself to point to the player position, but in certain directions the raycast results aren't being aggregated to put the walls where they should be. It's impossible to fix it and find out what's wrong because the processing code is hidden in the DLL.
     
  • Schneider21Schneider21 Posts: 47
    Brain Burst
    Does Oculus staff even read these posts? I've not seen a single issue brought up here ever get a response.

    I'll throw mine in here anyway. The LocomotionTeleport setup doesn't work with the Character Controller Constraint as it should. When teleporting to a point lower in elevation than your current position, the player is moved to the correct XZ coordinate, but the Y coordinate remains that of their previous position. Then the player either drops or floats, depending on gravity settings.

    Disabling the Constraint component resolves the Y axis issue, but then you don't get roomscale adjustments, wall clipping protection, and snap rotations rotates you around a point outside the character. I've seen Oculus staff mention before that if you're doing roomscale, you shouldn't be using the OVRPlayerController component, but both the LocomotionTeleport and camera constraint component require it to be used...

    Honestly, it really feels like there needs to just be an Oculus Integration 2.0 that starts things from scratch, because this package seems to become more of a mess each update. Just my frustrated two cents, though.
  • m_davism_davis Posts: 0
    NerveGear
    Just got started with Quest development and have found a bug in this package to do with controller angular velocity.

    OVRInput.GetLocalControllerAngularVelocity() result is inverted on Quest. Result is correct on Rift. To see this issue, open the sample scene "AvatarGrab". Grab a block and toss it while turning the controller. It will spin in the opposite direction to what is expected.

    I'm using Unity 2018.4.3f1.

    In the meantime, I'm using VRTK and the OculusIntegration scripts found here https://github.com/ExtendRealityLtd/VRTK.Tutorials.OculusIntegration, and I've messily edited OVRAnchorVelocityEstimator.cs to detect whether Quest is in use and invert the result.

    Before:
    protected override Vector3 DoGetAngularVelocity()
            {
                switch (trackedGameObject.name)
                {
                    case "CenterEyeAnchor":
                        return trackedGameObject.transform.rotation * (OVRManager.isHmdPresent ? OVRPlugin.GetNodeAngularVelocity(OVRPlugin.Node.EyeCenter, OVRPlugin.Step.Render).FromFlippedZVector3f() : Vector3.zero);
                    case "LeftHandAnchor":
                        return trackedGameObject.transform.rotation * OVRInput.GetLocalControllerAngularVelocity(OVRInput.Controller.LTouch);
                    case "RightHandAnchor":
                        return trackedGameObject.transform.rotation * OVRInput.GetLocalControllerAngularVelocity(OVRInput.Controller.RTouch);
                }
                return Vector3.zero;
            }
    After:
    protected override Vector3 DoGetAngularVelocity()
            {
                switch (trackedGameObject.name)
                {
                    case "CenterEyeAnchor":
                        return trackedGameObject.transform.rotation * (OVRManager.isHmdPresent ? OVRPlugin.GetNodeAngularVelocity(OVRPlugin.Node.EyeCenter, OVRPlugin.Step.Render).FromFlippedZVector3f() : Vector3.zero);
                    case "LeftHandAnchor":
                        if (OVRPlugin.GetSystemHeadsetType() == OVRPlugin.SystemHeadset.Oculus_Quest)
                        {
                            return trackedGameObject.transform.rotation * -OVRInput.GetLocalControllerAngularVelocity(OVRInput.Controller.LTouch);
                        }
                        return trackedGameObject.transform.rotation * OVRInput.GetLocalControllerAngularVelocity(OVRInput.Controller.LTouch);
                    case "RightHandAnchor":
                        if (OVRPlugin.GetSystemHeadsetType() == OVRPlugin.SystemHeadset.Oculus_Quest) {
                            return trackedGameObject.transform.rotation * -OVRInput.GetLocalControllerAngularVelocity(OVRInput.Controller.RTouch);
                        }
                        return trackedGameObject.transform.rotation * OVRInput.GetLocalControllerAngularVelocity(OVRInput.Controller.RTouch);
                }
                return Vector3.zero;
            }

  • MarkHenryCMarkHenryC Posts: 34 Oculus Start Member
    1.38 seems to break OVRHeadsetEmulator. This conditional is never set in OVRManager.cs:

    if (OVRPlugin.initialized || (Settings.enabled && Settings.loadedDeviceName == OPENVR_UNITY_NAME_STR))
    {
    InitOVRManager();
    }

    Is there something else we should be doing in the setup that's not described in the documentation?
    Same issue here. Never returns true so InitOVRManager is never called. Breaks the headset emulator but there'd be numerous other issues, since the static 'instance' is never set, so OVRManager can't be called. Will roll this update back.
  • RalphSchaedlerRalphSchaedler Posts: 5 Oculus Start Member
    I also get

    Virtual Reality SDK Oculus failed to initialize.
    Will attempt to enable OpenVR instead.


  • Timo3000Timo3000 Posts: 10
    NerveGear
    TeleportTransitionBlink script is also not working anymore. I think the important lines of code are commented out ;-)
  • zCeylzCeyl Posts: 1 Oculus Start Member
    Hi,

    Same issue here (Virtual Reality SDK Oculus failed to initialize.) with this update and unity 2018.4.2... Is there any fix or workaround? 
  • vehicle91vehicle91 Posts: 2
    NerveGear
    edited July 16
    Hi,
    1.(Unity Integration v1.37)Unity UnityEngine.XR.Recenter not working on Quest.
    2.(Unity Integration v1.37)Left handle is out of power, right handle cannot fire(OVRInput.GetDown(OVRInput.Button.SecondaryIndexTrigger)) (PS: exit the game, right handle trigger button is effective)
    Is there any fix or workaround?Thx!😀
Sign In or Register to comment.