ARDK 2.x -> 3.4 Upgrade: Lightship seems to break Image Tracking

Correct - and sure thing. :slight_smile: Iā€™ve popped a link to a ZIP file of the stripped back project (sans Library & Builds folders) below. Iā€™ve had one of my coworkers make a build from this same ZIP file and he was able to repro the bug with it, so hopefully itā€™ll be the same for your developers.

https://drive.google.com/file/d/1M_qEPhKKxvJQL5XewB2TDa_SJ0PMP4YG/view?usp=drive_link

Hi Jess,

I have an update for you. The issue is still being looked into but it looks like weā€™ve been able to narrow it down to the image library not being created with Lightship + ARCore. The cause is still something thatā€™s being investigated since it doesnā€™t appear to be happening to every user. Can you try the following steps to see if it works for you as a workaround:

  • In PackageManager, remove Lightship ARDK
    • This may cause some ARFoundation class not found issues, that is ok
  • Close Unity and go to your projectā€™s folder
  • Update "com.unity.xr.arcore" entry in Packages/manifest.json to "5.1.4"
  • Delete the Library folder to force a reimport of packages
  • Re-open Unity
  • Select Google ARCore as Android provider in XR Plugin Management
  • Double check the images youā€™re using and make sure that read/write is still enabled in case it was disabled at some point
  • Reinstall Lightship as a UPM through Package Manager
  • Now, you should be able to change between ARCore and Lightship as providers
  • Next, build with just ARCore and see if that continues to work as it has been.
  • Finally, build with Lightship + ARCore and see if image tracking works now.

The purpose of the last two steps is to see if switching to ARCore without having to uninstall Lightship to do so will properly create the image library and then allow Lightship to use that same image library when building with Lightship

Thanks for the update! Iā€™ve just followed those steps in the non-stripped back project, and tried a few other things. Unfortunately, still no luck. Here are my findings:

  • Following the steps provided, ARCore Image Tracking worked, but with Lightship + ARCore = same issue as previous.
  • Exporting the TrackedImageLibrary when ARCore was set, deleting it, switching to Lightship + ARCore, then reimporting the TrackedImageLibrary = same issue as previous.
  • Creating & assigning a new TrackedImageLibrary whilst the project is set to ARCore, then switching to Lightship + ARCore = same issue as previous.
  • Creating & assigning a new TrackedImageLibrary whilst the project is set to Lightship + ARCore = same issue as previous.
Potentially red herrings, but click here for some other things I noticed

When I build with either provider, even if Iā€™m not referencing Unityā€™s provided TestReferenceLibrary in the project, I get this warning message:


Screenshot 2024-07-08 120923

When I build my test scene using that TestReferenceLibrary with either provider, the Debug Logs tell me that the image count is 0 (despite being able to see them set in Editor). (The logs say the count is as expected on my own TrackedImageLibraries when tested with each provider)

Also: I never have any issues deleting the Library folder before doing a Lightship + ARCore build, but after doing a Lightship + ARCore build I have to force delete (Shift + Del) the Library folder despite being on an Admin account. Even hitting continue and entering Admin credentials doesnā€™t let me delete it.
Screenshot 2024-07-08 123738

Iā€™m in my last couple of days with our company, so my coworker @James_Brooks will be your point of contact on this bug report going forward. :slight_smile:

James has just managed to get Image Tracking working in the following dev environment (with a caveat, see :warning: ):

  • Upgraded from Unity 2021.3.3f1 to 2022.3.35f1
  • Installed ARFoundation first
  • It installed ARCore with it
  • Then he installed ARDK 3.6
  • :warning: Enabled BOTH AR Core & Lightship + AR Core at the same time (which I know isnā€™t meant to be possible).
  • :warning: When I had both providers checked in the ARDK3 beta it broke Semantic Segmentation & Occlusion Extension (see Discord ), so James is now testing to see if our must-have Lightship features are working with these settings. Heā€™ll keep you updated on how this goes, cuz this might be an okay workaround for us in the interim. :slight_smile:

Hi Jess,

Thanks for letting me know. Itā€™s been a pleasure interacting with you on our community forums and Discord. I wish you the best in your future endeavors :slight_smile:

Iā€™m not sure which of you will see this and reply back but what appears to be happening when both are selected is only ARCore is actually taking effect which is also the Lightship features such as semantics and occlusion extension stop working; ARCore completely overwrites Lightship.

Another thing that was suggested was maybe trying to rename the image library asset from its default name in case thatā€™s somehow being used as some sort of magic hardcoded string value somewhere and itā€™s causing issues

This may also be helpful. A user is having similar issues but in their case, they can remove ARCore after following the steps they provided in their last reply and it seemed to work. Itā€™s similar to what I originally suggested just in a bit of a different order. https://community.nianticspatial.com/t/ardk-3-6-stops-image-tracking-from-working/4659/3

Hi Jesus,

Thank you for the update. I will be picking up on this where Jess has left off. First of all thank you so much for taking the time to go through this with her and helping us with this bug. Iā€™ve had a speed-walk through with Jess as she has obviously been the one handling the work weā€™ve been doing with ARDK.

As Jess mentioned, I had previously been able to check both ARCore and Lightship boxes, but that is no longer the case as selecting the Lightship box disables the ARCore one now.

I will take a look through the link and then walk through before testing again.

Hi James,

Checking in to see if you had a chance to try out the userā€™s solution I linked

1 Like

Hi Jesus,

Sorry for delay, comms were down for a bit last week.

So yes, I was able to try that solution that worked for the other user but without any luck. As Jess had mentioned previously I was able to have both ARCore and the Lightship + ARCore boxes ticked, but that didnā€™t last long as closing and re-opening Unity mustā€™ve reset the loaders and I could no longer check the ARCore box.

Also, having the Lightship + ARCore box ticked now results in me having black screens on my AR scenes, and I no longer get a permission to use Camera popup? When I remove Lightship from the project and use ARCore separately thatā€™s not an issue.

I am also targeting API 34 now and wondered if this could be an issue?

Hi @Jesus_Niantic

Just wondering if there has been on progress on this bug or if there is anything else we could possibly try?

Hi James,

Iā€™m sorry about the delay. I hadnā€™t heard back and lost track of this topic.
Ok so then if what that user proposed didnā€™t work for you, let me check on the status of the bug I filed

Hi @Jesus_Niantic

Any update on the status of this bug?

There hasnā€™t been any change in the behaviour. Still using ARDK 3.6, but I see there is a more recent version at 3.7.

I suppose upgrading to this version couldnā€™t do any harm and keep trying.

Hi James,

I would recommend updating to 3.7 if thatā€™s something you can do. Weā€™re still looking into the issue. At the moment we believe itā€™s a versioning issue but havenā€™t been able to determine which version of what is causing problems with image tracking.

1 Like

Hi Jesus,

Thank you for that response. Okay, I will strip out 3.6 and anything else that came with it, and install 3.7 to see how we go. Fingers crossed some kind of magic happens