Sample "visionOSTemplate-1.1.6" failed to remove World Anchor

  1. Add the following code block to “Assets/Samples/Apple visionOS XR Plugin/1.1.6/VR Sample - URL/Scripts/SampleUIController. cs” to listen for anchor change events
void Start()
{
m_nchorManager.anchorsChanged+=OnAnchorsChanged;
}
Void OnDestroy()
{
m_AnchorManager.anchorsChanged -=OnAnchorsChanged;
}
Private void OnAnchorsChanged (ARAnchorsChangedEventArgs obj){
}
  1. Run the Sample application and add a few anchors.
  2. Click on “Clear World Anchors” and observe that all anchors have disappeared, but OnAnchorsChanged has not received any event of anchor deletion.
  3. Focus on the pop-up control center at the top and exit Immersive mode.
  4. Open the Sample application again in the application list, wait for a few seconds, and find that the previously deleted anchor appears again.

Hi there! Sorry to hear you’re having trouble.

This doesn’t actually quit the app, FYI. You need to long-press both the “crown” button and the capture button (i.e. both buttons on the top of the headset) to open the force-quit menu to properly shut down the app.

This is unexpected. In my experience, the clear anchor button works as expected. Is it possible you’re pinching again (or maybe the system is detecting a pinch when you open the app?) to create a new anchor?

Can you submit this project in a bug report with these repro steps? I know it’s based on our own example, but I have not seen the behavior you are describing, so it will be useful to see the exact project setup. Thanks!

Thank you for your attention! Today we retested it and confirmed the specific scenario of the issue. When switching from the control center to the background and then switching back to the foreground, the previously cleared World Anchor reappears. However, after forcibly closing the application process and restarting it, the World Anchor does not reappear. Below is the compressed Project code package. Looking forward to your reply!

https://wx-service-dev.oss-cn-beijing.aliyuncs.com/test/visionOSTemplate-1.1.6.zip