Hi! I open this thread because I'm playing for first time with WebGL in unity 5. First thing I saw is that there is not any streamed option like in webplayer. What do you think about WebGL? It works well for you? Any idea to powered our games?
Another point: Weight. The weight of my project is about 23 Mb for the web player. If I try to compile the same project (with no optimizations) in webgl the weight is increased until 338Mb. It's crazy, someone try to optimize the project? What did you get?
Hi! Have a look in the folder of your build. There you should find a folder named "Compressed". Unity uses Gzip compression to reduce the sizes. So if you configure your webserver to serve gzip compressed content, this will be the size that will actually be sent over the network. To further reduce the size you should do an optimized build and enable the bytecode stripping in the player settings. Also have a look if you can further compress your assets (e.g. sprites,...). My game still looks quite nice and size was reduced by another few MB. Finally keep in mind that your webgl build also contains the UnityEngine. As far as I know Unity should strip code which is not used. E.g. if you don't you use Physics3D make sure it is not referenced somewhere in your code so it can be stripped outt. But I'm not sure how far this is implemented in Unity right now! My project which has a Webplayer size of approximately 10MB is down to roughly 28MB (size of complete Compressed folder) but I haven't enabled SpriteAtlas compression in the WebGL version right now. So there might be a reduction of a few MB still possible. Regards, Stefan
I didn't find that folder. I'm gonna try again, maybe it's an option that I should active before to build. Anyway are great news. I'm really thinking to use this technology for my commercial games as soon as possible.
http://docs.unity3d.com/500/Documentation/Manual/webgl-building.html Ok, I found this and I think that now it's really clear. We have to uncheck the development build option. Now my game have a size of 37 Mb, not bad. But I should fix a lot of things (Input settings, some sounds, etc.) but it works fine. Anyway, I need to stream my game, so maybe this is the solution: http://docs.unity3d.com/Manual/DownloadingAssetBundles.html What do you think?
As written here before, AssetBundles work. For streaming like in the web player, try this plugin I made: http://files.unity3d.com/jonas/WebGLLevelStreaming.unitypackage