Open tschoartschi opened 8 years ago
Hey @tezheng!
I'm reaching out because we have the same problem to solve. Did you have an success on that? Every trick would be awesome. Maybe we could contribute to your project.
Let me know what you think.
The project updated 3 years ago, i don't know it is in active development or not. I am looking for same thing. Any progress?
We ended up rewriting everything in Three.js. We didn't find a way to bring Unity WebGL onto mobile web browsers so we were forced to use something else.
We ended up rewriting everything in Three.js. We didn't find a way to bring Unity WebGL onto mobile web browsers so we were forced to use something else.
I am able to run webgl in chrome by enabling webgl in chrome goto: chrome://flags search: WebGL Draft Extensions and enable it.
My project start running on chrome but have to check that which features are not working properly.
Our problem was not WebGL our problem was that the Unity WebGL export is huge and therefore many mobile devices just crash when you try to start up a Unity WebGL export.
Yes, maybe this is the reason, Unity also states the same
Note that Unity WebGL content is not currently supported on mobile devices. It may still work, especially on high-end devices, but many current devices are not powerful enough and don’t have enough memory to support Unity WebGL content well. For this reason, Unity WebGL shows a warning message when trying to load content on mobile browsers (which can be disabled if needed).
While i am able to run the webgl in andriod, but it is not loading the asset bundles. Showing different warning or maybe errors. Like after loading the player
GLSL: Cannot determine the struct size for 'webgl_ade8414d51e6a184'.
GLSL: unexpected struct parameter 'webgl_ade8414d51e6a184[1].ÕÀbµÅwebgl_a10910d5196f9b04[0]'.
blob:http://103.53.44.206/16c4ada7-e063-4fed-81b2-de7d52fee7fa:275 WebGL: INVALID_VALUE: bufferSubData: buffer overflow
[.WebGL-0xab299400]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: uniform buffers : buffer or buffer range at index 0 not large enough
Or when try to load asset bundles
GLSL: unsupported array parameter '[0]'
Unity WebGL works on mobile. You need to change your playback engine output to WebGL 1.0 // OpenGL ES 2.0, no HDR, no post processing stack. We have a rigged character running on an iPhone and Android.
Oh, and with the new WASM streaming stuff -- if you can work out your MIME types server side, you shouldn't have any of the crashing issues. Memory should automatically scale up. Theoretically if you optimize your overhead shouldn't be dramatically more than threejs, but threejs loads so fast that it might just be a better option for most things. I'm building an app right now that does webcam and AR with OpenCV.js and talks to a Unity WebGL app handling all the UI, game logic, etc.
Hey @tezheng!
I'm reaching out because we have the same problem to solve. Did you have an success on that? Every trick would be awesome. Maybe we could contribute to your project.
Let me know what you think.