Search Unity

Contradicting instructions on how to remove an ARAnchor

Discussion in 'Documentation' started by xwonder, Apr 1, 2021.

  1. xwonder


    Jun 18, 2018
    Hello, I believe I found a contradiction in the documentation (manual) regarding the removal of ARAnchors from a given scene.

    On the doc site of AR Anchor Manager it's stated: "To remove an anchor, Destroy the ARAnchor component (or its GameObject)."

    Doing this will cause a Null Reference error, which the Trackable Manager doc site warns against:
    "You should never Destroy a trackable component or its GameObject directly. For trackables that support manual removal, their manager provides a method to remove it. For example, to remove an anchor, you need to call RemoveAnchor on the ARAnchorManager."