Anchor and WorldMap support on VisionOS

I got error for compile the project when I try to use WorldMap.

using UnityEngine.XR.ARKit;

error CS0234: The type or namespace name ‘ARKit’ does not exist in the namespace ‘UnityEngine.XR’ (are you missing an assembly reference?)

Is WorldMap not supported yet? Or it supported through other package?

Correct, ARKit in visionOS does not support world map. See the ARKit in visionOS documentation here. It’s a subset of what’s available for ARKit for iOS.

Hi Dan
Thanks for the info.
Since the world map not supported in VisionOS, what is best solution to anchor something relative in real world space for cross session?

I saw in the VisionOS arkit document there are “WorldTrackingProvider” and " WorldAnchor", but can not find any related unity document in ARFundation or polyspatial, are these supported?

I believe the best solution at present is to use image tracking (for example, using a QR code as a fiducial marker).

:frowning_face: Nooooooooooo, for MR markerless world tracking is important, using marker make the experience feels like decades old tech.
Is there a plane to support world anchor in Unity for VisionOS?
Please send this feed back to Dev and consider it as a feature request. Thank you. :pray:

Guess meantime only option is make native app with this feature then.

It’s not supported natively, either. Note that the ARKit feature required to share the same anchors between devices, ARWorldMap, doesn’t support visionOS. I suggest providing feedback to Apple requesting this feature.

What I mean is World Anchor, this is for same device use cross sessions, when you close and reopen app, you can still relocate the anchors. In apple document WorldTrackingProvider and WorldAnchor are supported.

I looked through unity AR Foundation document, the AR Foundation package and unity.xr.arkit package, didn’t see any related classes.

Sorry, my mistake; I thought you meant “multiple sessions” as in “multiple users looking at the same content through their own devices.”

@mtschoen can probably shed more light on whether we support anchor persistence.

We expose World Anchors through the AnchorManager component in AR Foundation.

Hi @mtschoen I can not find any document about World Anchors under AnchorManager, as well as the code base. Only thing I can find is ARWorldMap, but it is not supported on VisionOS.
Can you please point out the document or the class name for World Anchor under AnchorManager

We don’t have a specific class for WorldAnchor. In this case, the anchors used by ARAnchor and ARAnchorManager are simply persistent across sessions. You don’t need to do any extra work to make them persist. Simply include an AnchorManager in your scene, and create objects with an ARAnchor component on them to add anchors to the system.

You can check out the package samples in com.unity.xr.visionos to see an example for how to use AnchorManager. Once you have added an anchor and it is successfully tracked, you can store the trackableId somewhere to associate that ID with the persistent anchor, and attach whatever content/objects you would like to show up in that location. On subsequent launches of the app, the AnchorManager will load any known/recognized anchors, and their trackableId will match what was given when the anchor was first created.

Hope this helps!