Empty new project with 2019.1.0a12, then adding AR Foundation from package manager:
Library/PackageCache/[email protected]/Runtime/AR/ARSessionOrigin.cs(3,19): error CS0234: The type or namespace name 'SpatialTracking' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
I'm guessing this because 2019 is missing the UnitySpatialTracking extension (which is found in 2018.3, where this error doesn't occur)
This is because the TrackedPoseDriver has been moved to a package in 2019.1, and we will need a separate package version to support it (the same package cannot be used for both 2018.3 and 2019.1, since the package it was moved to requires 2019.1).
If you want to try the bleeding edge now, you'll need to add this package to your project's manifest.json:
"com.unity.xr.legacyinputhelpers": "1.0.0"
and also add a reference to UnityEngine.SpatialTracking to ARFoundation's asmdef.
Will this be fixed for the next AR Foundation update?
This is happening in 2019.1.0a14, interestingly the manifest.json file already contains "com.unity.xr.legacyinputhelpers": "1.0.0"
still present with 2019.1.0b7 and commit 32ada6a on Feb 2
@tdmowrer packages through package manager are read-only by default and changes to them are "fixed" at next editor load. This project probably has to be updated to 19.1 (maybe leave behind a 18.3 branch for legacy support?)
FYI - arfoundation package version 1.1.0-preview.6 works great with 2019.1.0b8.
I think this is fixed now. Please reopen if it's not
This issue exists in 2019.1.0f2. How to fix this? Thanks
@julia1981 Make sure you are on AR Foundation 1.1 not 1.0. Only 1.1 works with 2019.1.
Thanks, did a update and it works
Can confirm that it's fixed in 1.1.0-preview.6, but the error is back in 1.5.0-preview.2. I tried installing com.unity.xr.legacyinputhelpers, but was unclear as to how to properly modify the assembly file to link them.
Use ARFoundation 1.5 for Unity 2018.3/4
Use ARFoundation 2.1 for Unity 2019.1/2
The only difference between ARFoundation 1.5 and 2.1 are the versions of Unity with which they are compatible. Unfortunately, there is no way for us to specify a _max_ version of Unity.
Whoops, didn't even think of that. Thanks for the heads up!
@tdmowrer If you create a unitypackage in Unity 2019.2.18f1 and load it in another project using Unity 2019.2.18f1, this still seems to be a problem; without adding "com.unity.xr.legacyinputhelpers": "2.0.2" to your manifest file, the AR Session Origin object is broken, as others have mentioned.
Also, the script reference missing shows up as a warning, not an error-- I believe this should be an error as a TrackedPose driver not working in AR is a pretty fundamental mishap. The fact that nothing in any of the PackageManager descriptions says what you mention about 1.5 vs 2.1 is an oversight at the least. Aggressively, the PackageManager should prompt you to install legacyinputhelpers.
We no longer depend on the tracked pose driver. You can still use it if you want, but ARFoundation has its own ARPoseDriver which provides similar functionality designed specifically to eliminate the dependency on legacy input helpers.
If you replace your tracked pose driver with an AR pose driver, that should fix the problem.
There is a way around this error in Unity 2019.1.7f, all you have to do is to install AR Foundation, remove it and reinstall AR Foundation, for some reason this worked for me.
@Yo030 Thank you, this unblocked me!
Most helpful comment
Use ARFoundation 1.5 for Unity 2018.3/4
Use ARFoundation 2.1 for Unity 2019.1/2
The only difference between ARFoundation 1.5 and 2.1 are the versions of Unity with which they are compatible. Unfortunately, there is no way for us to specify a _max_ version of Unity.