White screen on Play mode in Unity


#1

Hello,

I am new using Unity. I imported the SDK package and it looks good, not errors. But, when I delete the main camera and add the Zappar Camera in play game mode I just see a white screen.

Does anyone knows why is that happening?

Regards,

John


#2

I @john.lopz ,

I encountered the same problem.
It seems that the Zappar Camera does not work correctly in Unity editor play mode (at least with my hardware setup).
To quickly perform my test in editor, I created a prefab with two cameras, an “editor” camera (that is a simple Unity camera), and the Zappar camera.

I attached a script to this prefab, with a reference to both my camera; this script, in the Awake method, activates the correct camera depending on the current platform:

private void Awake()
{
#if UNITY_EDITOR || UNITY_STANDALONE
arCamera.gameObject.SetActive(false);
editorCamera.gameObject.SetActive(true);
#else
editorCamera.gameObject.SetActive(false);
arCamera.gameObject.SetActive(true);
#endif
}

I also created a useful public property, that return the correct camera based on the current platform:

public Camera MainCamera
{
get
{
#if UNITY_EDITOR || UNITY_STANDALONE
return editorCamera;
#else
return arCamera;
#endif
}
}

In this way, I can simply access the MainCamera property without caring about the current platform.

This is obviously a workaround, hoping that the editor play mode will be fixed soon, but it was useful to speed up testing the core logic of the application.

Hope this will help you too.

Best,
Alessio


#3

Hi guys,

Thank you so much for highlighting this - does the issue persist even when you change build modes?

We are currently investigating this so hopefully there will be some news regarding the issue included in the upcoming package update.

I also want to thank you for your ingenuity - I’ve fed this information back to the team as it’s a lovely workaround and it might be good to include something like this in our package in the future.

Have a great day!
Francesca :blush:


#4

Thanks @a.bottosso for your answer.

I haven’t been able to test your suggestion yet.
As soon as I can, I’ll let you know.

Greetings,

John


#5

Hi @Francesca,

Unfortunately the issue persist even when you change build modes.

Regards,

John


#6

Hey @a.bottosso,

I tried to use and understand the code, but I couldn’t.

I got a bunch of errors :frowning: If not too much to ask, could you please send me some screenshots of the camera prefab and the script.

Thanks a lot,

Blessings,

John