Search Unity

ARCore 1.0 is causing new EntryPointNotFoundException errors in Unity console

Discussion in 'AR' started by OmarK, Feb 24, 2018.

  1. OmarK

    OmarK

    Joined:
    Mar 17, 2015
    Posts:
    11
    I've downloaded the new SDK and ran the sample HelloAR scene on a clean project, but I keep getting an EntryPointNotFoudnException error in the console printed every frame. The same is happening after I've updated the ARCore SDK used in my other project. Curiously the app still seems to work fine when I run it in the editor or build it to my phone, but I'd still like to know what these errors mean and how to stop them from appearing. If it's relevant, I'm running the latest version of Unity (2017.3.0f3)

    Here's the full error printed to console:

    EntryPointNotFoundException: ArCoreUnity_setArPrestoInitialized
    GoogleARCoreInternal.LifecycleManager._Initialize () (at Assets/GoogleARCore/SDK/Scripts/Managers/LifecycleManager.cs:223)
    GoogleARCoreInternal.LifecycleManager..cctor () (at Assets/GoogleARCore/SDK/Scripts/Managers/LifecycleManager.cs:58)
    Rethrow as TypeInitializationException: An exception was thrown by the type initializer for GoogleARCoreInternal.LifecycleManager
    GoogleARCore.ARCoreSession.Awake () (at Assets/GoogleARCore/SDK/Scripts/ARCoreSession.cs:42)
     
  2. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    374
    Same here. Do you get them in adb log on device?
     
  3. OmarK

    OmarK

    Joined:
    Mar 17, 2015
    Posts:
    11
    I get them in the console window when I run it on Unity's editor, I assume I'd get them in the adb log as well
     
  4. small-potatoes

    small-potatoes

    Official Google Employee

    Joined:
    Aug 26, 2017
    Posts:
    1
    Hey All,

    Although ARCore Unity SDK 1.0 does not feature support for using ARCore functionality in-editor, it is not supposed to write an error to the console each frame. This issue should NOT be present when running on-device and will be fixed in the next release. Developers can fix it themselves in the meantime with the following change.

    Change line 327 of GoogleARCore/SDK/Scripts/Managers/LifecycleManager.cs from this:
    Code (CSharp):
    1. [DllImport(ApiConstants.ARCoreShimApi)]
    2. public static extern void ArCoreUnity_setArPrestoInitialized(
    3.     EarlyUpdateCallback onEarlyUpdate);
    To this:
    Code (CSharp):
    1. #if UNITY_EDITOR
    2.     public static void ArCoreUnity_setArPrestoInitialized(
    3.         EarlyUpdateCallback onEarlyUpdate) {}
    4. #else
    5.     [DllImport(ApiConstants.ARCoreShimApi)]
    6.     public static extern void ArCoreUnity_setArPrestoInitialized(
    7.         EarlyUpdateCallback onEarlyUpdate);
    8. #endif
     
    Cynni, Frencich, Eiseno and 7 others like this.
  5. OmarK

    OmarK

    Joined:
    Mar 17, 2015
    Posts:
    11
    That worked perfectly. Thank you!
     
  6. vijay_deshetty

    vijay_deshetty

    Joined:
    Nov 18, 2015
    Posts:
    1
    Thanks alot ...Worked for me