I have created a URP project which has some 3D characters and UI in canvas. When I am deploying the Webgl build in computer browser it opens normally but when I am opening the same Webgl link in mobile browser then the 3D objects are not at all rendering. Please someone HELP!
Maybe it is due to
- Graphic Api used or
- Linear / gamma
- Shader problem
Guessing you built the project with the default Texture Compression DXT ?
Project Settings > Player > Other Settings > Texture Compression Format
Build it with ASTC and try that on a mobile device.
Also like mentioned above, uncheck Auto Graphics API and manually select Webgl 2. If you’re using the 6.1 beta, it might have built on WebGPU, which your phone might not be compatible with.
Respectively on the most recent iOS 18.2 WebGPU support is not enabled by default even though the hardware is compatible. WebGPU can be enabled via Settings app I believe. Check under Safari => Experimental features.
Sorry for the lack of information
Graphics API auto/Webgl 2.0 (tried both)
Linear
Universal Render Pipeline/Lot shader is the only one used, no custom shader.
I am using the LTS unity 6 version, specifically 33, also was the same on 32.
Using ASTC, the build was successful but I got error on loading in browser saying ASTC is not supported, same with ETC2, rolled back to DXT.
I don’t know about the concept of webgpu or how to or if to enable or disable it in unity 6 lts.
I am so sorry I missed on so much information, I am in a kind of panic.
Is it enabled by default?
WebGPU is still experimental in most browsers and is not commonly enabled by default.
Not entirely certain texture formats might be the source of your issue here, but just in case:
Did you mean your browser on your phone? ASTC is not supported for PC, only mobile.
Texture compression on WebGL for is a can of worms when it comes to multi-platform support
https://docs.unity3d.com/6000.1/Documentation/Manual/texture-formats-reference.html
https://docs.unity3d.com/6000.1/Documentation/Manual/webgl-texture-compression.html
In a project i personally did, to avoid all of this i built 1 DTX and 1 ASTC version, and then used the index.html javascript to decide which to load.
let isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);