Search Unity

he type or namespace name 'SpatialTracking' does not exist in the namespace 'UnityEngine' (are you m

Discussion in 'ARCore' started by CrocsxG, Mar 26, 2019.

  1. CrocsxG

    CrocsxG

    Joined:
    Jan 2, 2018
    Posts:
    2
    I am using latest unity 2018.3.10f1 and I have the following error in google SDK AR CORE.
    There is similar issue on the internet, all say that updating unity would fix the issue, but since I have the latest option, I wanted to know if there is a fix ?

    I have commented out the function that need this feature (cause I do not use it) but if you have any clue.

    thanks
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    554
    I just opened https://github.com/google-ar/arcore-unity-sdk in Unity 2018.3.10f1 without any errors. Do you have the latest ARCore SDK for Unity? If so, can you paste the full error message here?
     
  3. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    411
    I found that simply UPDATING EVERYTHING IN PACKAGE MANAGER seems to fix this problem.
     
    bowserscastle likes this.
  4. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    554
    Just to clarify for future readers of this thread: OP mentions using "google SDK AR CORE", which is a plugin provided by Google.

    However, "UPDATING EVERYTHING IN PACKAGE MANAGER" suggests you are using ARFoundation, which is different. ARFoundation 1.0 is only compatible with Unity 2018.3. Unity 2019.1+ requires ARFoundation 1.1, which resolves the compilation errors related to
    UnityEngine.SpatialTracking
    .
     
    ethqnit, BVGuled, TomKhan3 and 3 others like this.
  5. Fattie

    Fattie

    Joined:
    Jul 5, 2012
    Posts:
    411
    Quite right, @tdmowrer sorry to add to the confusion.

    In my case I was using Unity's current (I think only?) AR sample project: https://github.com/Unity-Technologies/arfoundation-samples

    In a word, if you "download that and try it" at the moment, (it has not been updated in a long time) you get the same error as in this question; if you google there's a pile of QA about it. Indeed simply "updating everything" fortunately fixes the problem with /arfoundation-samples. Thanks.
     
    TheKingOfTheRoad likes this.
  6. dormouse

    dormouse

    Joined:
    Mar 1, 2011
    Posts:
    65
    I got the same errors after upgrading Unity3D to 2019.2.0f1 using Unity Hub.
    in the attach, you can find all errors after importing ARCore SDK 1.10.
    Please help us to find a solution. thanks
     

    Attached Files:

  7. hiachrism

    hiachrism

    Joined:
    Aug 16, 2019
    Posts:
    4
    The majority of those errors are because the Unity Multiplayer HLAPI package is missing. High-level networking is no longer included by default for new projects.

    There will likely be one remaining issue due to SpatialTracking namespace not being available where TrackedPoseDriver lived before; that one I haven't tracked down yet and am just backing down to 2018.3 to get started for now.

    Edit: Nevermind, according to the newer instructions for ARCore setup for Unity 2019, it now requires addition of HLAPI package as well as the XR Legacy Input Helper in Package Manager. Guessing that will resolve most if not all errors using ARCore in 2019.2 projects.
     
    agopwns and goutham12 like this.
  8. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,129
    Hello,

    I am using Unity 2019.2.9

    I downloaded the MRTK developemnt branch because I want to use both XR (Hololens 1/2) and AR Features (Android) in my augmented Project.

    It gave me exact this error (see title), I tried multiple times with latestest prerelease packages etc.

    How do I get rid of it? If I use the older MRTK branches, there seem to be Android Errors, which just seem to be fixed 8 days ago...

    upload_2019-11-19_16-5-48.png

    Thanks a lot! :)
     
    sami1592 likes this.
  9. agopwns

    agopwns

    Joined:
    Dec 10, 2019
    Posts:
    1
    It's works for me. Thank you! I go to Package Manager and install 'XR Legacy Input Helpers' and 'Multiplayer HLAPI'. try this.
     
  10. richard48s

    richard48s

    Joined:
    Apr 15, 2017
    Posts:
    1
    In Unity 2019.2 the HelloAR example doesnt fully work, there are only blue dots shown, but no plane is recognized

    Switching back to 2018.3 it works like a charm

    (AR core Unity package 1.14)
     
  11. sami1592

    sami1592

    Joined:
    Sep 18, 2013
    Posts:
    52
    Were you able to fix this issue?
     
  12. sami1592

    sami1592

    Joined:
    Sep 18, 2013
    Posts:
    52
    I had the same issues as him.

    Installing
    ARFoundation 2.1
    for Unity 2019.1/2/3 from Windows>Package Manager fixed my issues.
     
unityunity