Hi, i want to create a web game for all platforms (PC, Android, iOS, etc), I just tried Web GL, and it works perfectly in all pc browsers, but on mobiles it's very slow, don't always run, and always pop up an allert, that says web GL is not supported by phones. I use Unity 5.6.2f1, and i know the build options for Web Player was removed in Unity 5.4, but why? Web GL is better than that? Doesn't exist another option for export a game direclty in HTML5? Thanks a lot for the support
Web Player doesn't work in Chrome. WebGL is slow on a mobile device. You are trying to find a one size fits all solution. I do not think that really exists. Remember, html5 is essentially Javascript (in browser) You are at the mercy of what the interpreter uses on the device. If you use a slow interpreter, you get slow performance. Your best bet it to build to the platform that you are working on. So, if you are building to a PC, use the standard player. Mac, use the player for a mac, android use the android builder and so on. Do not try to shoe horn your project into one export method.
You don't. You run it as a native Android app. This is the general trend in web gaming. No one wants to install and manage a bunch of plugins when the spec has progressed enough to include the functionality right in the various frameworks. This (and security vulnerabilities) is why Adobe is discontinuing Flash and why Unity doesn't use their own browser plugin anymore.
Building an app for Android or iOS is better than a web app that you try to run in a mobile browser. While webGL is improving, you're still going to get better performance out of an app then a mobile web experience. It's also likely to give your user a better experience.
I know, my boss ask me that for work. We want a method to display in any device and in any browser a web based game with good performance. Maybe the best method for do that is in HTML5, but i prefer to develop in Unity, and maybe export in HTML in some way...
But that's what WebGL is for, isn't it? If you have performance issues, you might need to investigate which part is causing the problem. (Hint: use the Profiler).
While we would hope it will get there, webGL isn't the issue. Most mobile browsers (and even mobile devices) just don't handle webGL content very well. And in many cases, the browsers lack support for the newer tech that will actually allow for better performance from webGL content. In this case, it's not a webGL issue. It's the browsers needing to be updated for the tech.
Mobile WebGL support always lags more behind every other option. It will be worse than native app performance, any desktop WebGL browser which supports it at all, and there's no guarantee you'll have more than WebGL1 available. You already have cross-platform support in Unity - adding the web platforms also adds even more limitations than you already have with mobile. Networking and local storage can get weird, for instance. WebGL is great for desktop demos and previews, but mobile devices are already limited enough before you add the even more sandboxed environment of web browsers.
Mobile browsers aren't optimized for or intended for games. Your game would have to be extremely simple to perform consistently well across an array of mobile devices and mobile browsers. With built in support for standard mobile platform apps, you can also be sure that the Unity developers and QA teams are not thoroughly testing WebGL on mobile platforms, at least anywhere near the extent as on desktop.
I found an alternative to Unity to develop in HTML5, it's Play Canvas, very similar to Unity and dedicated only for HTML5!
Yeah, I was not going to be the one to tell you Unity probably was not the engine you wanted to work with. Play Canvas is pretty neat though. I tinkered with it a few years ago. If I remember it uses pure ecma6 javascript