Search Unity

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.