Log in or register to post comments

Vuforia goes pink on re-enable

September 12, 2019 - 1:07am #1

Welcome,

 

I have a problem - camera feed goes black or pink (like a missing shader). Vuforia is disabled by default, I enable it only when needed. How to recreate bug: Disable Vuforia, then use other web cam (for getting front camera photo), then I re-enable Vuforia.

This worked fine on Unity 2018.2.15f1 and Vuforia 6.2.10. Due to Google requirements, I needed to upgrade to Unity 2018.3.13f1 and Vuforia 8.1.10.

 

Please I need quick help, since the client has paid Vuforia and store app is currently not available.

 

The code bits to stop Vuforia:

 

CameraDevice.Instance.Stop();

        CameraDevice.Instance.Deinit();

if (mMR_Vuf_BGPlane != null)

            mMR_Vuf_BGPlane.enabled = false;

 

(vuforia BG plane is found automatically as a child of ARCamera runtime).

 

To re-enable Vuforia I basically revert the above:

if (mMR_Vuf_BGPlane != null)

            mMR_Vuf_BGPlane.enabled = true;

CameraDevice.Instance.Init();

        CameraDevice.Instance.Start();

 

 

 

Best regards

 

Vuforia goes pink on re-enable

September 12, 2019 - 7:41am #4

Thank you very much, that does the job. Strange is I use this method in other parts of the application - I guess I wanted to make sure the background plane is fully disabled when taking photo.

 

Best regards

Vuforia goes pink on re-enable

September 12, 2019 - 2:47am #3

Hi,

In order to disable Vuforia at runtime my recommendation would be to use VuforiaBehaviour.Instance.enabled = false. Give it a try.

If this fails, please provide the adb log with the timestamp when you initialize Vuforia for the app.

$ adb logcat AR:D Unity:D *:S

Thank you.

Vuforia Engine Support

Vuforia goes pink on re-enable

September 12, 2019 - 1:12am #2

FYI I have tried forum tricks like changing graphics API from AutoGraphics API to OPENGLES 3 or 2, and the only difference here was the camera feed went black.

Log in or register to post comments