Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

using UnityEngine.XR.ARFoundation - not exists?

Discussion in 'Handheld AR' started by arielfel, Dec 8, 2018.

  1. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    25
    Hi guys, Im sorry to bring this silly problem but im trying to run the sample scene from AR foundation, and after 3 hours with uninstalling/installing ARfoundation package (and ARcore and ARKit) and 2 unity versions check, it seems like nothing is working...
    it looks like the foundation package can't deploy its library, I keep getting UnityEngine.XR.ARFoundation not exists.
    upload_2018-12-8_20-55-59.png

    I've tried it with Unity 18.2.18f1 and Unity 18.1.9f2
    all AR packages are v1.0.0

    Also, there is nothing on google...:/
    anyone else had this problem? please help:)
    Thanks, Ariel
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    490
    Another person had a similar issue a while back. It was almost like the word "foundation" was done Unicode that just looked that way. Sounds of, but could you try deleting that love and retyping it?
     
  3. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    25
    Hi, sorry... im not fully understand what you suggest:/
    But I can tell that the only library the visual studio recognize while im typing UnityEngine.XR... is WSA.
    upload_2018-12-9_15-5-17.png
     
  4. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    490
    You did as I was suggesting; thanks. Are there any errors in the console window?
     
    abennani likes this.
  5. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    25
    Hi:) No, there are no errors in unity consol. only in the VS saying it can find the libraries.
    BTW I've tried loading it on another PC that runs Unity 2018.2.12f1, there are no problems over there...
    any idea why on one PC it working and not on the other? ( I don't think it because of unity versions...)
    again, many thanks for the help:)
    Ariel
     
  6. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    25
    Hi, sorry to bother again but any idea why its happening...?
    Im adding another pic from the VS, it gives an error even without using XR.. namespace.
    upload_2018-12-10_21-45-21.png
     
  7. Bduinat

    Bduinat

    Joined:
    Nov 26, 2018
    Posts:
    12
    Hi,

    I've got a similar problem.
    Using Unity 2018.3.0f2
    ARFoundation.PNG

    Seems like ARFoundation is not part of Unity.XR
     
  8. Jakob

    Jakob

    Joined:
    Sep 29, 2011
    Posts:
    10
    Did anyone find a solution for this ? Because when trying to add using " UnityEngine.XR.ARFoundation " it is not there ? What is wrong? I have imported all the packages needed but nothing..
     
  9. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    792
    People of this thread, have you installed ARFoundation package? Look in Package Manager UI and you should see something like this:

    Screen Shot 2019-01-19 at 11.39.02 PM.png
     
  10. KMarc

    KMarc

    Joined:
    Feb 5, 2018
    Posts:
    22
    @jimmya I'm having the same issue, and yes I do have ARFoundation installed via the package manager. All of the built in example components work fine for me with no error (ARPlaneManager, etc).

    In my case I'm wanting to write a custom ARPlaneManager, so I've created a new script and copied over the code from the built in ARPlaneManager and immediately references to ARSessionOrigin, ARPlaneAddedEventArgs, etc all throw compiler errors saying that they can't be found.

    Does this issue perhaps have to do with the core ARFoundation classes being sealed? (I have little experience with sealed classes)
     

    Attached Files:

  11. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    792
    You're probably missing a "using" at the top?
     
  12. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    25
    Bro I've installed it with the package manager and the "using" is there....( this is happening with the given default scripts)
    Any other ideas what else can we do?
    Thanks
     
    KMarc likes this.
  13. KMarc

    KMarc

    Joined:
    Feb 5, 2018
    Posts:
    22
    Yes ..... I've made sure I have the correct using statements. Also have tried having the class be inside the same namespace which should have all that covered anyways. Also am running Visual Studio which helps ensure all that is ok.
     
  14. nyudeb

    nyudeb

    Joined:
    Mar 20, 2015
    Posts:
    10
    I had the same problem and I had to update visual studio to 15.9.6. And solved.
     
    arielfel likes this.
  15. SolutionsGameDev

    SolutionsGameDev

    Joined:
    Apr 3, 2019
    Posts:
    3
    Upgraded to visual studio 15.9.11 and it still not working.
    The packages AR Foundation, ARCore XR Plugin, and ARKit XR Plugin are added in the project and up to date.

    Update: I wrote a dummy Debug.Log line, saved the script and let the unity re-compile, then ran the code with a break point. It now sees XR.ARFoundation.
     
    Last edited: Apr 22, 2019
  16. damosdesigns

    damosdesigns

    Joined:
    Dec 2, 2016
    Posts:
    2
    @SolutionsGameDev can you elaborate a little more please? I'm experiencing the same issue. Where did you leave a break point? This allowed you to build and run?

    UPDATE: Solved by using Unity 2018.3.14f1. I misinterpreted the getting started page when it said use Unity 2018.3+ to mean you could use the 2019 versions. Silly me!
     
    Last edited: Apr 27, 2019
    lloydhooson likes this.
  17. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    284
    Unity dev team, did you even test your scenes? I just checked AR Foundation samples, and got 2 issues:
    1. double error on ANY scene start in Editor
      Code (CSharp):
      1. FormatException: Input string was not in a correct format.
      2. System.Number.ParseSingle (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
      3. System.Single.Parse (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
      4. System.Single.Parse (System.String s, System.IFormatProvider provider) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
      5. UnityEngine.XR.ARKit.ARKitImageTrackingSubsystem.RegisterDescriptor () (at Library/PackageCache/com.unity.xr.arkit@2.1.0-preview.3/Runtime/ImageTracking/ARKitImageTrackingProvider.cs:124)
    2. continues errors each frame in ARWorldMap scene
      Code (csharp):
      1. InvalidCastException: Specified cast is not valid.
      2. ARWorldMapController.get_supported () (at Assets/Scripts/ARWorldMapController.cs:240)
      3. ARWorldMapController.Update () (at Assets/Scripts/ARWorldMapController.cs:278)
    Mac, Unity 2019.1.1f1, ARFoundation 2.1.0 preview2, ARCore 2.1.0 preview4, ARKit 2.1.0 preview3
     
  18. unity_2FB6Iy0EY2OQCQ

    unity_2FB6Iy0EY2OQCQ

    Joined:
    Sep 18, 2018
    Posts:
    1
    Capture.JPG
    These versions of packages worked for me. If you require the latest packages of AR foundation then update Unity to 2019.1.
     
    Last edited: May 21, 2019
  19. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    284
    Yes, I require, and that's why I have updated project to 2019.1.1 as well, I mentioned it in my last comment
     
  20. flvr

    flvr

    Joined:
    Jul 12, 2016
    Posts:
    3
    I had the same issue. The thing is which when you install a new Unity it downgrades mono version so you need to install mono 6 which is preview version after installing a new version of the unity.
    Again It doesn't matter which version of the Unity your project is opened in it is just because of the Mono version. At least in my case it was.
    I hope it helps.
     
    SolutionsGameDev likes this.
  21. flvr

    flvr

    Joined:
    Jul 12, 2016
    Posts:
    3
    Also forgot to mention already project is spoiled. Do this.
    1. Close all unity projects
    2. Download and install mono framework 6 (Remember it is a preview version)
    3. Install mono
    4. Create a new unity project
    5. Migrate your files from existing project into new project (Files in asset folder)
    6. Open new project which now you have your files in
    7. make sure you resolve you uninstall and install AR foundation arcore and arkit from package manager
    8. Close the project
    9. Copy project settings files from previous project to new project settings (delete project setting fils in new project first)
    10. Open the project
    11. Everything should be fine
     
    SolutionsGameDev likes this.
  22. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    44
    Hello!
    I had to rebuild the ARSession and ARSessionOrigin from Unity after importing the new ARFoundation, ARkit and ARCore packages. Then I created a new class of my own and I was migrating the content ..
     

    Attached Files:

    • 1.png
      1.png
      File size:
      638.7 KB
      Views:
      115
    • 2.png
      2.png
      File size:
      222 KB
      Views:
      112
    • 3.png
      3.png
      File size:
      188.8 KB
      Views:
      105