WebGL doesn't Play on iOS?

I have this project that's meant to be played in the browser, iPhone, or Android, but the game doesn't seem to work on iPhone.

https://mashimaro7.itch.io/ballz

I read somewhere that compression can cause issues so i disabled it, and WebGL2 is no longer supported on Safari so i downgraded it to WebGL1, but it still won't run. Does anyone know what else i could do to fix it? It runs just fine on Android and PC.


It's the other way around. WebGL v1 is being deprecated as all browsers now support WebGL v2.

Anyhow, if you want help, you need to add a little more info than "doesn't seem to work". What is happening? What device? Have you tried rebooting it if it was just that one iPhone? Any error messages? Note: I'm sure console messages are accessible somehow even on the phone.

[quote=“CodeSmile”, post:2, topic: 912658]
It’s the other way around. WebGL v1 is being deprecated as all browsers now support WebGL v2.

Anyhow, if you want help, you need to add a little more info than “doesn’t seem to work”. What is happening? What device? Have you tried rebooting it if it was just that one iPhone? Any error messages? Note: I’m sure console messages are accessible somehow even on the phone.
[/quote]
Oh, i guess i read some incorrect information then, the Unity documentation said Safari doesn’t support WebGL 2.

I don’t really have any more information, the screen stays black and never loads.I’ve tried it on several devices, it works fine on my Android, but not on the 3 iPhones/iPads I tested it on. The screen just stays black after the Unity logo.

Safari didnt support v2 for the longest time but not any longer. iOS 15 finally added v2 support even though it was available since iOS 12 but in 12-14 you had to manually enable it thus making it practically unsupported for consumer apps.

What devices are you testing on? What iOS version? You could try to build an empty or template project to check if webgl builds generally work on these devices.

For debugging look into WebInspector and turning on debug mode of Safari on iOS.

[quote=“CodeSmile”, post:4, topic: 912658]
Safari didnt support v2 for the longest time but not any longer. iOS 15 finally added v2 support even though it was available since iOS 12 but in 12-14 you had to manually enable it thus making it practically unsupported for consumer apps.

What devices are you testing on? What iOS version? You could try to build an empty or template project to check if webgl builds generally work on these devices.

For debugging look into WebInspector and turning on debug mode of Safari on iOS.
[/quote]
I tested it on an iPhone 13, i don’t know the other versions(one’s my clients phone, idk the iPad lol). The iOS is version is 16. I’m not sure my fiancee would want me touching debug settings on her phone, would testing on virtual box give me the same results? Or would it run just fine on a Mac, and not an iPhone?

Edit: I also tested it on my Samsung and my PC browser with no issues.

Edit 2: Oh, now it’s running, it just doesn’t get past the menu. If i click play on the iPhone from the game’s menu, the screen turns white. My client said there was a weird error too, it said “a problem repeatedly occurred on https://mashimaro7.itch.io/ballz

Okay, well, I figured it out. Not sure if this will be of help to anyone, but the issue was the skyboxes my client had installed were gigantic.After i swapped them out, it all worked fine. Strange that huge skyboxes causes such an error to occur lol

I'm glad your issue was fixed! There was a webkit bug in iOS 16.1 that got fixed in iOS 16.4 beta 3 that caused some WebGL applications to crash. https://bugs.webkit.org/show_bug.cgi?id=248768 I can't say for certain if this is related to your problem, but just in case :)

1 Like