Unity WebGL build shows up nothing

Hello, I’m new to zapper.

I followed the simple instructions of importing the zapper package to unity, then building it out for webgl by selecting the zapper webgl template. One of the issues I had with the package was when I tired to create a camera using the zapper menu up top, it gave me an error telling me that the object doesn’t exist. And fair enough it didn’t. It was using the name Zapper Camera but there was no such object. So instead I manually placed the zapper rear camera into the scene and tried to build my project.

This is the link to it: https://webxr.run/ARagQQQokGWE

As you’ll see, it doesn’t load up. All it shows is: {{{ PRODUCT NAME }}}

If anyone has any insights on this, please let me know.

So I tried re-importing the package file for zapper and it works, kinda. What is happening is that it’s rendering the scene view but it isn’t asking for camera access or permissions or rendering the view from the background. I’ll link it here.

https://webxr.run/P161022Lb1R71

Please let me know why isn’t the camera rendering the real world environment or even asking for camera permissions?

Hi @ananya.samp,

Which browser are you trying to view this project on?

Firefox won’t ask for permissions by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1609427.

Please try using a different browser (Google Chrome) and let me know if the permissions are prompted and the camera view is shown.

George

I am having a simular issue on Chrome where my project never loads in the browser.

Hello @ananya.samp and @johnson.kat.g

Please find below some information which might help you in addressing the issue.

TLDR: Add a fresh UAR package from unity package manger via git with url: https://github.com/zappar-xr/universal-ar-unity.git. Wait for Unity to finish downloading the package and then use Zappar>Editor>Update Project Settings To Publish to configure your platform settings (ensure WebGL is your active platform, otherwise switch to WebGL platform from build settings and use the same option again). Take build and test it locally via Zapworks CLI or upload online on Zapworks.

Long Version

  1. Page doesn’t loads up and shows {{{ SOME_STRING }}}
    This would be due to incorrect WebGL template. As mentioned on our official documentation site you would have to select different WebGL template depending on which unity version you’re using, i.e. Zappar2019 for Unity-2019.x otherwise Zappar for Unity-2020.x or above. You can not use the same template for all unity versions.

  2. Unable to create Zappar Camera from menu option Zappar>Camera>{Front/Rear} Facing Camera
    Make sure you have only instance or UAR package imported into your Unity project. We’ve noticed similar issues from users using older *.unitypackage and then adding the git repo dependency on top of older project. Another thing is to wait till Unity finished updating the remote git repo completely when you are using option Zappar>Editor>Reimport Universal AR Git Package. Once that’s done you should be able to create zappar camera in your active scene.

  3. Asking for camera permissions
    Please note that some browsers cache these permissions in non-incognito mode. So if you’ve allowed the camera and sensor permission for the domain once, it won’t prompt for these permissions every time. You would need to clear your browser cache settings to test the permissions prompt. Also make sure you have Permission UI (WebGL) enabled from UAR Settings (Zappar>Editor>Open Universal AR Settings).

  4. Warning message on localhost: "This Connection is not Private"
    When hosting your build locally via Zapworks-CLI you’ll get this warning message, which is absolutely normal. The cli generates a self-signed certificate to enable HTTPS which is required on some browsers to request for camera permission. The browser complains about this certificate since this is not registered publicly. For local testing you can always accept the warning and continue.

Hope this helps.

Regards,

1 Like