Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

ARkit 1.5 RemoveImageAnchor dosen't work

Discussion in 'AR' started by XiaoMinghui, Sep 13, 2018.

  1. XiaoMinghui

    XiaoMinghui

    Joined:
    Aug 28, 2018
    Posts:
    2
    I use the GenerateImageAnchor.cs.But the RemoveImageAnchor dosen't work.How to deal with it.
     

    Attached Files:

  2. Ellie97

    Ellie97

    Joined:
    Nov 6, 2016
    Posts:
    1
    I really want to know the answer to this too. I've spent 2 days trying to remove image anchors.

    Edit: after scouring the rest of the forums, I found this. It's not really a solution though... https://forum.unity.com/threads/how-to-use-removeimageanchor-arimageanchor-arimageanchor.519928/

    Edit2 (SOLUTION!!!): call m_session.RemoveUserAnchor(arImageAnchor.identifier);
    m_session is a UnityARSessionNativeInterface variable
    Initialise it in start(): m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface();

    I personally called it in a coroutine a few seconds after the anchor initially created
     
    Last edited: Sep 28, 2018
  3. XiaoMinghui

    XiaoMinghui

    Joined:
    Aug 28, 2018
    Posts:
    2

    This can solve this problem,thanks you.
    https://bitbucket.org/Unity-Technologies/unity-arkit-plugin/issues/51/delegate-removeimageanchor-in