Unity SDK WebGL Android - OpenGL error


#1

Hey everyone!

I’m using Unity 2019.4.12f1 to develop a WebGL AR application using the Universal AR SDK. After creating a webgl build and running a web server using zapworks CLI. I got this Assert error when I opened the webpage in an Android phone (Android 10 OS). This doesn’t happen in iOS.

Has anyone faced this issue and if so is there a workaround for this?


#2

Hi @balashanmugam.1996!

Firstly, I’d make sure that you have the most up to date version of the Universal AR SDK for Unity package. Are you using any other plugins, combined with the Universal AR SDK package?

I’ve not seen this error personally before, but from what I can tell, it seems to be that the OpenGL state has changed in a way that Unity was not expecting. I’d double check your player settings to make sure!

You can get to your player settings by going to File > Build Settings. Then find the ‘Player Settings…’ button. When this window opens, make sure you are viewing the ‘Player’ section. Find ‘Resolution and Presentation’ and look for ‘WebGL template’. Select ‘Zappar’. Hopefully that helps!

Have a lovely day,
Francesca


#3

Thanks for looking into this, @Francesca

I downloaded the latest SDK and was trying to run the example from the Github website. I did select the “WebGL template” under “Resolution and Presentation” in the WebGL tab and I did not have any other extra plugins added to the project.

Here is the link for it:
[https://github.com/zappar-xr/zappar-unity-examples/tree/master/instant-tracking-3d-model]

Thanks :slight_smile:


#4

Hi @balashanmugam.1996, it’s my pleasure, happy to help wherever I can! :grin:

I can see that you are purely using the instant tracking example without extra plugins and the correct format - I’ve had a conversation with the team and it seems that some of these examples are outdated.

We’ll be working on an update for these projects in the coming days, so I’ll try and get back to you when I know there are more recent versions!

Have a great day,
Francesca :blush: