Search Unity

Resolved using UnityEngine.XR.ARFoundation - not exists?

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

Thread Status:
Not open for further replies.
  1. arielfel

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    33
    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
     
    shacharoz and A1320 like this.
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    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:
    33
    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

    Joined:
    Apr 21, 2017
    Posts:
    605
    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:
    33
    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:
    33
    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:
    17
    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:
    42
    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

    Joined:
    Nov 15, 2016
    Posts:
    793
    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. KrikeyAdmin

    KrikeyAdmin

    Joined:
    Feb 5, 2018
    Posts:
    29
    @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

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

    arielfel

    Joined:
    Mar 19, 2018
    Posts:
    33
    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
     
    KrikeyAdmin likes this.
  13. KrikeyAdmin

    KrikeyAdmin

    Joined:
    Feb 5, 2018
    Posts:
    29
    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:
    19
    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
    matth913 likes this.
  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:
    518
    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. exmonk

    exmonk

    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:
    518
    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. Schoolfablab

    Schoolfablab

    Joined:
    Jul 12, 2016
    Posts:
    4
    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. Schoolfablab

    Schoolfablab

    Joined:
    Jul 12, 2016
    Posts:
    4
    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
     
  22. Edur-Games

    Edur-Games

    Joined:
    Nov 21, 2017
    Posts:
    48
    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:
      1,334
    • 2.png
      2.png
      File size:
      222 KB
      Views:
      1,538
    • 3.png
      3.png
      File size:
      188.8 KB
      Views:
      1,274
  23. Deleted User

    Deleted User

    Guest

    If anybody else ends here after updating to UnityEngine.XR.ARFoundation 3.1 and ARReferencePointManager is gone, it seems to have changed name to ARAnchorManger. Whatever implications it might have, its a better name IMO
     
    AndrasBalazs likes this.
  24. lncslncs

    lncslncs

    Joined:
    Sep 30, 2019
    Posts:
    1
    I was having a very similar issue when updating to Unity 2019.3 and trying to use ARFoundation 3, using VSCode for editing. ARFoundation would not appear within the Unity package when trying to import it in the using statement. In the OmniSharp log of the project it kept saying that "the referenced ARKit.csproj does not exist" for all the different packages I was trying to use. Not sure exactly what the issue was but I fixed it by updating my version of Mono to the latest, and then downgrading the Visual Studio from 1.1.4 to 1.1.3 from package manager. Then I opened a new project as suggested above and rebuilt the project manually. Now seems to be working.
     
  25. mattsonic1

    mattsonic1

    Joined:
    Sep 11, 2014
    Posts:
    5
    Thanks. I had this problem as well. Downgrading to VS Code Editor package version 1.1.3 fixed it.
     
  26. Faustik

    Faustik

    Joined:
    Jan 16, 2020
    Posts:
    2
    Hello everybody,
    I'm trying for the last few days everything to make the "UnityEngine.XR.ARFoundation" run in Visual Basic, but with no success. I´ve tried everything written above and all combinations with versions, even uninstalling everything, cleaning registers and instaliling again and no way to make it work.

    Anyone has any magical idea?

    Many thanks!!
     
  27. InvaIidUsername

    InvaIidUsername

    Joined:
    Jun 26, 2017
    Posts:
    2
    I don't know if this is related but under "Edit/Preferences/" then external tools, make sure External Script Editor is iset to the desired editor (VS 2019) and make sure Generate all .csproj files is ticked
     
    chrisr17 and bruceweir1 like this.
  28. Faustik

    Faustik

    Joined:
    Jan 16, 2020
    Posts:
    2
    You've made my day man! Thanks a lot, it's running!!

    For any case I leave here number of versions that I use now:
    Unity 2019.3.1f1
    Manager Package:
    AR Foundation 3.0.1
    AR Core XR plugin 3.0.1
    Visual Studio code editor 1.1.4

    VS 2019 16.4.6
     
  29. bobejner96

    bobejner96

    Joined:
    Aug 15, 2020
    Posts:
    3
    @Faustik How did you installed AR Foundation 3 / Core 3 in Unity 2019.3 ?

    I cant see higher version that 2.1.8 in Package manager in Unity 2019.3 ...
     
  30. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    In the Package Manager, make sure you expand the foldout next to the package name and then click "See all versions"
    Screen Shot 2020-09-01 at 9.03.40 AM.png
    Screen Shot 2020-09-01 at 9.04.10 AM.png
     
  31. jipsen

    jipsen

    Joined:
    May 22, 2018
    Posts:
    37
    If I removed JsonDotNet Standalone Assemblies, I would get all sorts of issues with ARFoundation.

    I fixed it by reimporting JsonDotNet, closing the project, deleting Library folder, then opening the project again.

    (Just in case you use Unity Transport - ) I had to downgrade and then reupgrade Unity Transport after the steps above because it was throwing extra errors.

    Also, don't forget to switch platform!
     
    IL_Briz likes this.
  32. Ylor

    Ylor

    Joined:
    Dec 15, 2014
    Posts:
    16
    I had the same problem:
    The type or namespace name 'ARTrackedImageManager' could not be found (are you missing a using directive or an assembly reference?)


    And it turned out I manually had to add Unity.XR.ARFoundation to my assembly definition. If you are using custom assembly definitions in your project, this could be the case.
     
    hatamoto77 likes this.
  33. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
    it still happens also with unity 2020.3
    i moved a project from one pc to another, and perhaps what causes it is a failure in reimporting the project.
    solved by:
    1. signing in with your unity user on the second pc.
    2. option A: removing a package and reinstalling it.
    2. option B: install a completely new package and then remove it.
    it does not need to be a specific one. unity just needed a reimporting of packages after the project was alive.
     
Thread Status:
Not open for further replies.