Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice
  4. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

How to use RemoveImageAnchor(ARImageAnchor arImageAnchor)?

Discussion in 'AR' started by jbvobling, Mar 2, 2018.

  1. jbvobling

    jbvobling

    Joined:
    Sep 26, 2017
    Posts:
    27
    i'm looking for a way to remove the object via button when the object appeared by image recognition, so that when i use the image again in another place, I can make it appear again.

    Anyone know how to decipher and use the "RemoveImageAnchor(ARImageAnchor arImageAnchor)"?
     
    Last edited: Mar 2, 2018
  2. pero

    pero

    Joined:
    Oct 4, 2012
    Posts:
    2
    I was attempting to do something similar.
    This issue marked resolved helped me.
    The solution brought up in the 3rd comment works for my use case.

    I haven't looked too heavily into the "RemoveImageAnchor" function, but I am assuming what I read in that issue is accurate. Since at this very moment there have not been any new commits since Feb 21st.
     
  3. jbvobling

    jbvobling

    Joined:
    Sep 26, 2017
    Posts:
    27
    I'm actually using that link for removing all anchors. The problem is when i'm using UnityARSessionNativeInterface.GetARSessionNativeInterface().RemoveUserAnchor( anchorID );

    When I opened two(2) or more image targets then I deleted 1, when I re-focus again, the app hanged.
     
unityunity