Universal AR not working with Unity WebGL

It doesn’t work. I tried this example; https://github.com/zappar-xr/zappar-unity-examples/tree/master/image-tracking-3d-animation but what happens is that the selfie camera is activated instead of the rear camera, so I can’t point at the target image. On top of that, it’s excruciatingly slow.

However, I don’t think this is a bug with UniversalAR, but with Unity itself. There are several bugs with Unity regarding accessing the device camera on mobile webgl. I was hoping UniversalAR did not rely on the official API to do this, but apparently it does. Here are 2 of the most prominent issues:


Even the gyroscope: https://issuetracker.unity3d.com/issues/webgl-android-gyroscope-does-not-work-relative-to-the-device-view-orientation-on-android-webgl

As it stands, although the UniversalAR package technically works with webgl, in practice it does not because of the aforementioned bugs. Maybe you guys can find a workaround until Unity fixes their API?

hi marks.
I had a similar problem and it was that I did not have the updated sdk. try to download the sdk from here and see how it goes.

Unity | Universal AR SDK (zap.works)

1 Like

thanks for the tip @ramosgamedev . It worked after I repeated the procedure, but didn’t overwrite the camera script this time. It worked. It’s still very slow on Android, but on iOS it works fine.

1 Like

It stopped working. The 3d model simply won’t show up anymore. What is the best Unity version to use with UniversalAR?

I am currently using 2019.4.1f1. It is working well for my project (I am not using the github examples), although I see some issues on older devices such as audio clicks/pops on Android.

I also had to create my own Image Tracker object, instead of the Zappar prefab, and then attach ONLY the Zappar Image Tracking Target script. The prefab has a second script (Zappar Edit Mode Image Target) that kept crashing my project. It is not needed.