Errors when upgrading ARDK from 1.3 to 2.0

Include the following details while filing a bug report (edit as applicable):

  • Issue category: upgrading ARDK
  • Device type & OS version: Android / NA
  • Host machine & OS version: Windows 10 Home
  • Issue Environment : Unity
  • Xcode version:
  • ARDK version: 2.0
  • Unity version: 2020.3.33f1

Bug reproduction steps:
I get 16 errors when I import ARDK 2.0. I have 2 different projects, an empty Unity project with just ARDK and the sample scenes and my game project. I get the same 16 errors when in both projects with ARDK 2.0. None of the errors have to do with the breaking changes mentioned in the release notes.

Is there any special upgrade process that I missed? I read through ARDK 2.0.0 Release Notes 2022-05-17 — Niantic Lightship Augmented Reality Developer Kit release-2.0 documentation looking for an upgrade guide, but didn’t see any, so I just imported 2.0 over the top of 1.3.1.

All of the errors seem to be cause by the LocationService. Just compared the classes in the old and the new sdk, and it seems that some of them where renamed, and also have internal changes (e.g. using different enums now)

LocationService 1.3.1
Location-1-3-1

LocationService 2.0.0
Location-2-0-0

So to be sure, you should probably not only import 2.0 over 1.3.1, but first remove the old files (especially in this folder) and then import the 2.0 package new.

And if you made any adaptions on them manualy, also ensure to backup them first :wink:

So I get the same set of errors, when I deleted ARDK 1.3.1 and import 2.0 into my project.

When I delete both ARDK and ARDK Examples and import ARDK 2.0 back in, I don’t have any errors except the missing references to the scripts I had used from the ARDK Examples. Then after I Import ARDK Examples 2.0 into my project, I get a whole new set of errors “namespace ‘Legacy’ does not exist”:

I can remove these using statements because none of them are being used in the project. After I clean up the using statements, there’s more errors:

This process produces the same errors for my test project which was just a “empty” Unity project so I could safely tinker with the examples.

If I import ARDK 2.0 and ARDK Examples 2.0 into a brand new Unity project, there’s no errors at all…

Hi Darryl, welcome! I want to make sure your issue was resolved by importing ARDK 2.0 & ARDK examples 2.0 into a fresh project in Unity?

Seems they changed the namespace of the Input-System.
Before it was: Niantic.ARDK.Utilities
Now it is: Niantic.ARDK.Utilities.Input.Legacy

So, you should be probably able to solve the 8 errors by adapting these using statements (instead of removing them)

1 Like

Turns out the errors come from the fact that I have the legacy Input Manager disabled (in Unity) and am using the new Input System. As a result the PlatformAgnosticInput is ignored.

I was able to resolve my problem by setting my project to use both the legacy Input Manager and Input System and deleting the ARDK folders before importing the 2.0 version.

Thanks for the help guys!

1 Like

Hi Darryl, glad you were able to solve your issue. Thanks all.

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.