- Home /
Unity5 WebGl for Mobile Browsers?
Hi, I am developing the application in Unity5 for web. Right now we are working in WebGl platfrom. After Chrome stop supporting the unity webplayer we have moved on this platform.
Now i have a query about the unity webGl application whether will play mobile browser or not? Because i have tested the webGl native project which is playing on the mobile browsers but its not playing.
So is there any way or any plug-in or any trick to play the untiy webgl content in mobile browsers?
Please help me to solve this issue. Thanks in Advance.
If the device's browser doesn't support HT$$anonymous$$L5 then no. It won't play. Why not build for the mobile device directly?
@screenname_taken i have tested in my mobile webgl applications that was playing, but unity exported webgl applications are not playing. What do i do that?
Is your html5 app running ok on a desktop browser?
Read somewhere it is not meant yet to work on mobile. So you may get it running to some extend until it fails or it will simply not do at all.
The WebGl is still in preview so it does not even support all browsers and the one it does are not yet entirely working I think.
WebGl is mainly to replace the web player, even more now that Chrome does not support it anymore
But for mobile, it is to be considered that Google or Apple will not see it with a nice eye. Allowing WebGl for mobile means no more control via store. So it could be understandable that they may not approve.
@screenname_taken yes my app run on the desktop browsers firefox and chrome
Answer by Schubkraft · May 15, 2015 at 01:30 PM
WebGL on mobile browsers is not supported. It even goes as far as saying that when you try to run it in a mobile browser.
Mobile browsers have a long way to go in order for us to support them.
@Schubkraft but the native WebGl are running the 3D content in the mobile browsers.. so i am expecting to run the same thing from unity.
I can understand the sentiment but mobile browsers are just not there yet. It is easy enough to run pure webgl on mobile but there is also the issue of parsing and running very big JS blobs which is pretty difficult considering the hardware and browser limitations on mobile.
Yes... you are right. i have seen unity presentation for webgl there they said they will overcome this issue. So we can expect this for mobile.
Please go through this link: http://forum.unity3d.com/threads/how-to-run-the-compressed-folder-gzip-content-in-my-html-page.326768/
Answer by Zheng Te · Dec 26, 2015 at 11:13 AM
Recently we developed toolchain that help to export Unity-made game to HTML5 content. The toolchain is in its early stage, there still a lot to be done, but our team is focus on it and the progress is good.
We also created a github project https://github.com/tezheng/UH5/. When the time comes we will open-source it.
Here is the first demo we release last week http://cyberytech.com:5000/mw2/. this is a COC style game, support iOS8 or Android 4.4+ (not PC-compatible now).
Anyone interested in this project, please email me tezheng1982_at_gmail.com.
Hi Zheng, any news about your project? Please let me know about it. $$anonymous$$any thanks
I'm also interested in this project. Could you give us a status? We are also searching for a solution to this problem. $$anonymous$$aybe we could $$anonymous$$m up.
Hi, there are any updates? I need a solution for developing in web for mobile,
Let me know!
$$anonymous$$ax
Answer by coolraiman · May 10, 2016 at 12:25 PM
webgl does work on most mobile browser
there is a lot of limitation but it does work. Work hard on optimization, avoid all normal/bump/reflection map. use crunched for all texture stay under 30k tris if your camera is moving cheat everything you can to save on performance and you will get a good visual and a 30 fps on high end device. for average devices like galaxy s3 you can get 15 fps wich is fine if you dont have to much physics
I can assure you that webgl can work really well with good fps if you know what you are doing without any plugin
As a matter of fact, at work the game we are making work on pc, android and iphone. The only device we have problems so far are ipads because they have a different standars for data caching and our result are really inconsistent with ipads
Also, i know it is sad but avoid all lightning and only use ambient light, no shadow
there are a lot of sacrifice to make for mobile webgl but you can still make good stuff
@coolraimain Thanks for your comment. We don't have that much problem with runtime performance. The bigger problem is the huge JavaScript "blob". When the JavaScript is parsed, most of the old devices crash... We tried to $$anonymous$$imize the exported JavaScript to a $$anonymous$$imum but we need the physics package which pulls in a lot of JavaScript. So right now we don't know how to optimize it without writing our own physics engine (which is way to much work and error prone)
the only way you can reduce the js blob is by buying the code source of the engine and then remove features of the physX engine if it is possible at all.
Answer by Xyn333 · May 07, 2016 at 03:48 PM
OK ,,, So obviously every one here is mis informed, and the question posed is how to make this work.
So simply develop your app/game/whatever,,, get it converted via phone gap, and use it on the site with either a cordova cross conversion or utilize the API's or custom framework structures that sketchfab has used to make html5 canvas work on any web browser.
There are many ways to subvert the google and apple corporate bullshit set restrictions, and as for the browsers having ways to go for support, this is utter nonsense,, they all support it,, browser development has been boosted in recent years by the development of cross platform API's
@Xyn333 Thanks for the clarification. I was asking because we are facing problems with old browsers/computers and mobile browsers. We don't want to create a phone gap app. Our problem is more a stability problem with the WebGL export. We are loosing a lot of users because the Unity WebGL export crashes on their devices. To prevent them from crashing, we restrict mobile browsers and old browsers from accessing our website. But we are still loosing more than 15% of the rest of the users. So the point of the question was more: how could we make the Unity WebGL export more stable, especially for people who are surfing our website with a mobile device.
Answer by Placebo Digital · May 10, 2016 at 07:50 AM
If you have a good investment in this, it would be a good idea to find / hire a top level html5 canvas / javascript developer , either those that have worked on things like , agario / slither.io and such games.
I have no solution for the problem itself, I do know that most games from unity webGL are forcefully buggy, I dont want to shout conspiracy, but its obvious that devices are powerfull enough to run webGL but every big agency such as APPLE and GOOGLE are shitting themselves, because we could then program in PAYPAL buttons for IAPs and subvert their taxation completely
Interesting comment. Do you don't think the Unity WebGL export will be stable in the near future? Rebuilding everything will be a huge investment and almost not feasible for us. Furthermore we hope to get new features like web assembly quicker with Unity. Also we are not doing some 2D game. We have 3D with lighting, textures etc. I think this will not be easy to port to another technology. Especially because we did a lot of tweaking regarding display/render quality
Yeah not sure about the stability issue with webGL,, as mentioned I think its forced and it could be better right now , but big boys will loose out to us little guys.
im not sure how to further assist tho.. sorry :(
Your answer
Follow this Question
Related Questions
How do I create a Wordpress page for the WebGL Player? 0 Answers
Capture Screenshot not working in WebGL 1 Answer
[WEBGL] PLAYER CONTINUES TO RUN AFTER WEBGL-CONTENT IS REMOVED FROM DOM 1 Answer
WEBGL input field on Android and iOS 0 Answers
Unity workspace get black when start the unity or minimize . 0 Answers