Search Unity

Resolved Oculus integration pack problem with Unity 2020.2

Discussion in 'VR' started by DerpWyvern, Dec 27, 2020.

  1. DerpWyvern

    DerpWyvern

    Joined:
    Mar 5, 2019
    Posts:
    8
    I'm getting 5 errors after downloading the oculus integration into my project (its a clean new project)

    4 of which are :
    error CS0234: The type or namespace name 'VR' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
    in 4 different scripts.

    I read online that VR was renamed to XR, so I managed to solve these bugs by changing "using UnityEngine.VR into UnityEngine.XR
    I haven't tested anything yet but at least the error disappeared.

    the fifth problem however is :
    error CS0234: The type or namespace name 'Boundary' does not exist in the namespace 'UnityEngine.Experimental.XR'
    in the OVRBoundary script.

    I looked online people said update the plugin it is fixed. but I'm running the latest version (23.1).
    I installed the XR-Plugin manager and the Oculus plug-in provider, I also changed the platform into android.

    anybody knows the solution to this problem?
     
  2. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    samra2494 and shacharoz like this.
  3. dstrawberrygrrl

    dstrawberrygrrl

    Joined:
    Aug 12, 2013
    Posts:
    8
    I'm unable to get past these same compilation errors in 2020.2.1f1. I even deleted the Oculus integration and re-added v23.1 but my OVRBoundary.cs does not include those conditional statements. What's the correct procedure here? Package manager indicates this is the version published on December 22nd.

    I'll add that changing the VR to XR fixed the other four errors, but the Boundary script is more tricky. My question is more that this thread is marked as Resolved, yet I see the same issue, so I want to find out what the steps are to fix this issue for myself and anyone else encountering it.
     
    Last edited: Jan 4, 2021
    JorickBronius likes this.
  4. spsmith224

    spsmith224

    Joined:
    Oct 25, 2016
    Posts:
    5
    Having this same problem, also with Unity 2020.2.1f1 and Oculus Integration 23.1.
     
  5. IainMcManus

    IainMcManus

    Joined:
    Feb 9, 2017
    Posts:
    2
    Seeing the same issue with 2020.2.1f1 and Oculus Integration 23.1. Some of the OVRBoundary ones have a clean fix (the retrieval of geometry points) but not the rest.

    Rolling back the Oculus Integration to 20.1 seems to fix the issue. It has specific preprocessors for Unity version 2020.1 and up.
     
    Last edited: Jan 5, 2021
  6. mk1987

    mk1987

    Joined:
    Mar 18, 2019
    Posts:
    53
    I have the exact same problem with 2020.2.1f1 and integration 23.1.

    Think this shouldn't me marked as resolved as whilst rolling back to 20.1 fixes the issue, it needs to be fixed in future versions.
     
  7. HoldensWesley

    HoldensWesley

    Joined:
    Apr 9, 2018
    Posts:
    3
    Same here. Only fix at the moment is what everyone says above is roll back to 20.1 though achive downloading though Oculus's website
     
  8. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    I double checked that Boundary script has been fixed since V18 and above. The possible reason that changes not being reflected after upgrading to latest Oculus Integration is prior version is overwriting of certain files.
    Before upgrading to latest package, manual deletion/ cleanup is required.
    Please see this link as reference to properly upgrade package: https://developer.oculus.com/documentation/unity/unity-import/

    Copy from the link above:
    Upgrade To Latest Package
    This section details instructions to upgrade any prior versions of the Oculus Integration package, which you’re using in existing projects, to the latest version of the package.

    1. Close Unity, if open.
    2. On your computer, go to the folder where you’ve saved the project. For example, /username/sample-project/.
    3. In your project, go to the Assets folder and delete the Oculus folder.
    4. Within your project, search for files beginning with the following text and manually delete them: Oculus and OVR. In addition, if you’re building an Android app, search for filenames starting or matching with AndroidManifest, vrapi, vrlib, and vrplatlib. These files are usually located in different folders of your project so it’s best to search by the filename and manually delete them.
    5. Open the project in which you want to upgrade the package.
     
    leac_abc likes this.
  9. dfkan12

    dfkan12

    Joined:
    Nov 1, 2017
    Posts:
    15

    Hi we tried everything mentioned here, deleting the oculus folder and all that etc. And still it doesn't work. Any other good suggestion?

    it´s has issues with the word "VR" and "Boundary", even after downloading V23.1
    Also in the lastest Oculusintergration I can't see the new pieces that you mentioned above with the "#if using XR..."
     
    Last edited: Jan 10, 2021
  10. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    Hi,

    That's odd. One more thing I can think about is to delete "{User}\AppData\Roaming\Unity\Asset Store-5.x\Oculus\ScriptingIntegration\OculusIntegration.unitypackage file".
    And try using a new empty Unity project, re-download / import latest OculusIntegration Asset and see if this time the Boundary script got the latest changes.
     
    ys724 likes this.
  11. dfkan12

    dfkan12

    Joined:
    Nov 1, 2017
    Posts:
    15
    Thanks a lot Tanya_Li, deleting the package file worked and now all the erros are gone.
    We experienced one more problem when building the apk, where it complained about having two copies of OVR Plugin. Disabling OVR Utilities Plugin in Oculus helped to solve that problem - it was suggested here by kersk: https://forums.oculusvr.com/developer/discussion/52524/ovr-plugin-updater-errors
     
  12. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    Glad to know that worked!
     
  13. Thaoren

    Thaoren

    Joined:
    May 15, 2015
    Posts:
    7
    Posting to add that this solution helped me, too. I had a previous version of the package installed from about a year ago and was receiving the code compilation errors as mentioned above. Deleting the package and re-downloading it solved the issue. Thanks!
     
  14. WonderLab_Developers

    WonderLab_Developers

    Joined:
    Jun 20, 2018
    Posts:
    1
    This worked perfectly! Thanks!

     
  15. VRHealthy

    VRHealthy

    Joined:
    Feb 18, 2017
    Posts:
    3
    I had the same problem with Unity 2020.3 (LTS) - updated Oculus Integration (turns out I still had the old 14.0 version from a while ago) and works fine now :)
     
  16. hekec

    hekec

    Joined:
    Mar 23, 2021
    Posts:
    3
    Have the same problem, tried everything mentioned here but didn't help
     
  17. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Since the above solutions aren't working, please file a bug report for us.
     
  18. vyurkiv

    vyurkiv

    Joined:
    Jun 12, 2021
    Posts:
    1
    it does not work for me.
     
  19. samra2494

    samra2494

    Joined:
    Nov 23, 2015
    Posts:
    21
    Replace your code with this in OVRBoundry.cs

    #if !USING_XR_SDK && !REQUIRES_XR_SDK
    using Boundary = UnityEngine.Experimental.XR.Boundary;
    #endif


    /// <summary>
    /// Specifies a boundary type surface.
    /// </summary>
    public enum BoundaryType
    {
    [System.Obsolete("Deprecated. This enum value will not be supported in OpenXR", false)]
    OuterBoundary = OVRPlugin.BoundaryType.OuterBoundary, ///< Outer boundary that closely matches the user's configured walls.
    PlayArea = OVRPlugin.BoundaryType.PlayArea, ///< Smaller convex area inset within the outer boundary.
    }
     
  20. JorickBronius

    JorickBronius

    Joined:
    Jun 21, 2013
    Posts:
    5
    I tried this suggestion but no dice.
    Before I arrived at this thread I've managed to kill those 4/5 errors by replacing VR with XR in the bugging scripts, remained also with the rather persistent boundary Error. I've walked through en executed all steps in this whole thread and still I remain with this one hardheaded error.
    Stuck.
    Additional help is very much appreciated.

    Mac OS 10.15.5
    Unity 2020.3.37
    Oculus VR plugin 1.12.1