Arcore-unity-sdk: Getting pink screen, first person camera not selected error

Created on 6 Nov 2017  路  3Comments  路  Source: google-ar/arcore-unity-sdk

I have been trying to integrate this interface into an existing ARKit project. I have been getting a pink screen when I build for android and run on pixel. (I have successfully built the example scene for android and run them on pixel using same unity/android studio installation. The issue is specific to my existing project scenes. )

I believe the issue is captured below, and originates from the "first person camera" not being selected. Such and error is thrown from GoogleARCore\SDK\Scripts\SessionComponent.cs:279

Any ideas on how to fix this from here? I have not been able to figure out what can be done to ensure the first person camera is selected.

I/tango_camera_native_jni: jint Java_com_google_tango_jni_TangoCameraNative_ConnectOnTextureAvailable(JNIEnv*, jobject, int, bool): camera_id = 0
I/tango_camera_native_jni: jint Java_com_google_tango_jni_TangoCameraNative_ConnectOnTextureAvailable(JNIEnv*, jobject, int, bool) called for cam id(0) before TangoService_connect(). Callback will be registered on next call to TangoService_connect().
I/tango_camera_native_jni: TangoCameraNative_ConnectOnImageAvailable context 0xc827711c, camera 0
I/tango_camera_native_jni: TangoErrorType internalConnectOnImageAvailable(TangoCameraId, void*, bool, void (*)(void*, TangoCameraId, const TangoImage*, const TangoCameraMetadata*)): Connecting callbacks...
E/NdkImageReader: AImageReader_getWindow
I/tango_camera_native_jni: TangoErrorType internalConnectOnImageAvailable(TangoCameraId, void*, bool, void (*)(void*, TangoCameraId, const TangoImage*, const TangoCameraMetadata*)) called for cam id(0) before TangoService_connect(). Callback will be registered on next call to TangoService_connect().
I/Tango: com.google.tango: 18377
I/TangoCameraNative: startCamerasIfNeeded: VHS ready so camera can start.
E/Camera2-Metadata: Update metadata entry: Unknown tag -1073741824
W/ndk_camera: Failed to set the TANGO_MODE vendor tag for the color camera!This may not be required on this device.
I/tango_camera_native: Camera 0 is open, starting.
I/tango_camera_native: Camera 0 is starting, waiting for it to be done.
I/ndk_camera: Camera capture session started processing.
I/tango_camera_native: Camera 0 start successfull.
E/Unity: The first person camera must be set for video overlay to work.
         UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
         UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
         UnityEngine.Logger:Log(LogType, Object)
         UnityEngine.Debug:LogError(Object)
         GoogleARCore.SessionComponent:_SetupVideoOverlay() (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:279)
         GoogleARCore.SessionComponent:_ConnectToService(SessionConfig, Action`1) (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:237)
         GoogleARCore.SessionComponent:Connect(SessionConfig) (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:196)
         GoogleARCore.SessionComponent:Connect() (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:145)
         UnityARInterface.ARCoreInterface:StartService(Settings) (at C
I/Unity: Connection state became Connected
         UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
         UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
         UnityEngine.Logger:LogFormat(LogType, String, Object[])
         UnityEngine.Debug:LogFormat(String, Object[])
         GoogleARCoreInternal.SessionManager:set_ConnectionState(SessionConnectionState) (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\Managers\SessionManager.cs:64)
         GoogleARCore.SessionComponent:_ConnectToService(SessionConfig, Action`1) (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:240)
         GoogleARCore.SessionComponent:Connect(SessionConfig) (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:196)
         GoogleARCore.SessionComponent:Connect() (at C:\Users\arjun\Documents\Unity Projects\tester\Assets\Plugins\GoogleARCore\SDK\Scripts\SessionComponent.cs:145)
         UnityARInterface.ARCoreInter

Most helpful comment

To anyone who still runs into this error when switching from ARKit to ARCore:
Changing the graphics API in the build settings (Other Settings) from OpenGLES2 to OpenGLES3 fixed this problem for me.

All 3 comments

Have you customized the ARCore Device prefab? That prefab has the reference to the first person camera included in the prefab set up.

Due to the lack of a response here, I'm assuming your issue is addressed. Please reopen if you are still having issues.

To anyone who still runs into this error when switching from ARKit to ARCore:
Changing the graphics API in the build settings (Other Settings) from OpenGLES2 to OpenGLES3 fixed this problem for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GTaylorRabbit picture GTaylorRabbit  路  5Comments

fredsa picture fredsa  路  4Comments

TakuKobayashi picture TakuKobayashi  路  4Comments

alexbu92 picture alexbu92  路  4Comments

ArigarasuthanRepo picture ArigarasuthanRepo  路  5Comments