ARCore SDK console error: `SpatialTracking' does not exist in the namespace ÚnityEngine'

Just following the instructions from the google developers website to get ARCore running in Unity leads to this console error:
Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs(32,23): error CS0234: The type or namespace name SpatialTracking' does not exist in the namespace UnityEngine’. Are you missing an assembly reference?

And furthermore I have: Assets/GoogleARCore/Examples/CloudAnchor/Scripts/ARKitHelper.cs(50,71): error CS0246: The type or namespace name `Pose’ could not be found. Are you missing an assembly reference?

I couldn’t find anything online relating to this error, and would appreciate any help.

Thanks

1 Like

Solved, was running on older Unity version.

May I know which Unity version you are using to solve this issue?

2 Likes

I have the same issue with Unity3D 2019.1.1f1 :frowning:
ARCore package I have imported is: arcore-unity-sdk-v1.9.0.unitypackage

Make sure you enable the appropriate packages that our samples use. See ARCore support for Unity developers  |  Google for Developers, specifically the “Unity 2019” section.

4 Likes

I still have this problem on Unity 2019.1.3f1

TrackedPoseDriver.cs exists in my project.

it reads [assembly: InternalsVisibleTo("UnityEditor.SpatialTracking")]
then below namespace UnityEngine.SpatialTracking

could this be a mismatch?

1 Like

I just ran into this issue during package maintenance:

As Chaosemer points out, the solution is clearly stated on the ARCore website. (Which ideally should be split by Unity version given that each version has its required tweaks)

Download the ARCore SDK for Unity and import it into your project by clicking the menu Assets > Import package > Custom Package. (Unity 2019 only: To fix the compilation errors, use Window > Package Manager to install the Multiplayer HLAPI and XR Legacy Input Helpers packages.)

18 Likes

You’re amazing with that unity 2019 only piece of information!!!

1 Like

Solved my problem running Unity 2019.1.0f2 on Ubuntu 18.04 (yes, I said Ubuntu). :slight_smile:

2 Likes

Awesome Brooo…cheerszzz…

1 Like

Download the ARCore SDK for Unity and import it into your project by clicking the menu Assets > Import package > Custom Package. (Unity 2019 only: To fix the compilation errors, use Window > Package Manager to install the Multiplayer HLAPI and XR Legacy Input Helpers packages.)
Thanks buddy you saved me a lot of time!

4 Likes

Crazy behavior noted: When I moved my project from 2019.1.14f1 on MAC to 2019.1.14f1 on Windows, it gave me this error. But when I built the project on Windows using 2018.3.7f1, it worked absolutely fine. No idea how and why.

It really helps! Thx a lot!

2 Likes

Thanks!!

THANK YOU VERY MUCH

For people using Unity 2020 versions:
Multiplayer HLAPI and XR Legacy Input Helpers packages are hidden in this Unity 2020 versions

Here’s the easiest way to regain access to those missing packages:

  • Go to Window → Package Manager
  • Click the drop-down menu (plus icon) on the top left of the window, and select add package from git URL

Type the following urls to add those packages:
com.unity.multiplayer-hlapi
com.unity.xr.legacyinputhelpers

9 Likes

This is exactly what I was looking for! Thank you so much.

great!! THANK YOU VERY MUCH…

<3

thank you