Loading AR Location from an Addessable asset bundle always shows location mesh

  • Issue category: VPS
  • Device type & OS version: iOS / Phone 12 por max on iOS 16
  • Host machine & OS version: Mac
  • Issue Environment : On Device
  • Xcode version: 14.1
  • ARDK version: 3.1.0
  • Unity version: 2022.3.12f1

Description of the issue:

I am developing an AR app that uses VPS and WaySpots, I am trying to load and track and AR location that is being loaded from an addressable asset bundle hosted a server, it seems to work fine, but the issue is that when the location is resolved it always shows the mesh of the location, If I run that same AR location locally with the same mesh the mesh is not shown when the location is resolved.

When the addressable has been completed downloaded I attach it to the AR location Manager, then subscribe to the location track state changed and then I start tracking.

  aRLocationManager.SetARLocations(defaultARLocation);
  aRLocationManager.locationTrackingStateChanged += LocationTrackStateChanged;
  aRLocationManager.StartTracking();

just as a note, I am getting an internal error when I am trying to track that location I am loading from the network.

ArgumentNullException: Value cannot be null.
Parameter name: value
Niantic.Lightship.AR.LocationAR.ARLocationManifest.set_LocationName (System.String value) (at ./Library/PackageCache/com.nianticlabs.lightship@7e30bd752f/Runtime/ARFoundation/Overrides/LocationAR/ARLocationManifest.cs:67)
Niantic.Lightship.AR.LocationAR.ARLocationManifest.OnValidate () (at ./Library/PackageCache/com.nianticlabs.lightship@7e30bd752f/Runtime/ARFoundation/Overrides/LocationAR/ARLocationManifest.cs:243)

Thanks in advance.

Hi Fernando,

When you say you’re using an Addressable Asset Bundle are you talking about Unity’s Addressable Asset System? Or something else?

Hi Jesus, yes I am using unity’s addresable asset system.

Hi Fernando,

Thanks, let me look into this and I’ll get back to you soon.

Hi Fernando,

Thank you for your patience.

The EditorOnly tag is being used to prevent meshes from being included in a mobile app. It sounds like the addressable system might be ignoring this.

Each AR Location in the scene hierarchy has a Mesh Container child GameObject which is what’s marked as EditorOnly to be ignored in the app unless the user checks the option to include the mesh. Can you see if you can prevent that Mesh Container from being included in the bundle to see if that resolves the issue?

Hey i’m also running into this problem.
When packing an ARLocation into an addressable it has a dependency on the arlocationmanifest of course, but packing in the mesh is making the size way too big for it to be useful.

Toggling the ‘include in build’ option doesn’t have any effect and i can’t seem to delete the reference to it. Is there a way to remove it from the .asset file perhaps? It’s difficult to find any documentation on this online so any pointer would be appreciated!