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. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Migrate from UnityARKit to ARFoundation

Discussion in 'AR' started by karsnen, Jun 17, 2019.

  1. karsnen

    karsnen

    Joined:
    Feb 9, 2014
    Posts:
    65
    Hello,

    I see that Unity AR Kit plugin has been deprecated. I have been using Unity ARKit plugin and now have to move to ARFoundation. My primary usage of ARKit plugin is with ARWorldMap.


    So far i have been using Unity 2018.3.14f1 but it looks like I have to use Unity 2019.1+ for ARFoundation.

    Is there any migration guide or can anyone give me recommendations. I would also like to know where to start ARFoundation?

    Thank you,
    Karsnen

    Unity ARKit Plugin
    https://bitbucket.org/Unity-Technologies/unity-arkit-plugin

    Unity ARFoundation
    https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@2.2/manual/index.html
     
    ina likes this.
  2. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,056
    Good question!

    Millions of Unity developer hours could be saved here if there's either an automated converter (like TextMeshPro package updates) or at least a very clear guide for upgrade.
     
  3. karsnen

    karsnen

    Joined:
    Feb 9, 2014
    Posts:
    65
    Thanks @ina. I have several request of such kind for no response. My ARFoundation setup is like this :

    Unity Version : 2019.1.6f1

    ARFoundation Version : preview.2 - 2.2.0

    ARKit Plugin : Preview 5 - 2.1.0

    Device iOS : 12.+

    XCode Version : 10.2.1


    What is yours? Maybe we could help each other.
     
  4. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    829
    Theres a few fundamental conceptual changes that would make automatic conversion a bit tricky.

    Manually converting over only takes an hour or two though... have done this recently on a project and it wasn't too painful, just be mindful of the change in concepts.
     
  5. karsnen

    karsnen

    Joined:
    Feb 9, 2014
    Posts:
    65
    @hawken Thank you for the reply. I have been searching for 3 elements for the past 2 weeks. Could you please help me locate these? I would highly appreciate it.

    1. Session Interruption Start/Ended Event
      When there is an interruption with the session, there would be a start & end event. Something like this : https://bitbucket.org/Unity-Technol...ce/UnityARSessionNativeInterface.cs#lines-345
      Where is this located?

    2. Session Failed Event
      If a session fails for some reason, there is a callback. https://bitbucket.org/Unity-Technol...ce/UnityARSessionNativeInterface.cs#lines-340


    3. Tracking Reason
      How to know the tracking reason when Tracking is limited
      https://forum.unity.com/threads/tracking-reason-in-arfoundation-with-arkit.698846/#post-4685585
     
    unnanego likes this.
  6. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    829
    - Session Interruption Start/Ended Event
    - Session Failed Event

    ARFoundation has auto resume. The nearest approximation I think is this:
    https://docs.unity3d.com/Packages/c...nityEngine.XR.ARFoundation.ARSystemState.html

    I think tracking reason has gone away, but theres a bunch of things you query the system state on.



     
    karsnen likes this.
  7. karsnen

    karsnen

    Joined:
    Feb 9, 2014
    Posts:
    65
    @hawken :
    Thank you very much for your reply. I highly appreciate it. I have one small question. Could you please explain what you meant by the following? I am unable to understand.