Unity5 WebGL Build Analysis

One more LIKE to unity for this Webgl port. Once if any animation, video and even images are flash in a website. As internet developed more new and better tools evolved like ajax, css3, html5, js, jquery... and as a game developer i see webgl as major development.
Plugin free game running in browser. This is one of the major feature which will game to reach a lot of people.
I had tried earlier webgl when introduced in a Linux environment with chromiu, then with three.js, now with unity 5.

Now I planned to port my Android game ZnopChains to webgl and publish the game online.
Upgraded the unity4 project to unity5, removed plugins like Unity Ads, Google play Achiments and Highscore, Soomla from the code. And fixed all errors because of this code removals.


Build SettingWebBuildSlow(fast builds)Fastest(very slow builds)
Resolution900 x 600900 x 600900 x 600
Publishing setting


WebGL Memorysize
256256
Enable ExceptionsYesNoneNone
Data Caching
offoff
WebGl Template
MinimalMinimal








Result


TimeLess timeMore compared to webuildMore compared to slow(fast builds)
Time2.3mb144mb49.5mb




Files createdindex.htmlCompressed\fileloader.jsgzCompressed\fileloader.jsgz

ZnopChains.unity3dCompressed\Html5.datagzCompressed\Html5_Fastest.datagz


Compressed\Html5.html.memgzCompressed\Html5_Fastest.html.memgz


Compressed\Html5.jsgzCompressed\Html5_Fastest.jsgz


Compressed\UnityConfig.jsgzCompressed\UnityConfig.jsgz


Release\fileloader.jsRelease\fileloader.js


Release\Html5.dataRelease\Html5_Fastest.data


Release\Html5.html.memRelease\Html5_Fastest.html.mem


Release\Html5.jsRelease\Html5_Fastest.js


Release\UnityConfig.jsRelease\UnityConfig.js


.htaccess.htaccess


index.htmlindex.html






FYI the above is not development builds.. 

These are the main files reason for the size reduction
Compressed\Html5_Fastest.jsgz
Release\Html5_Fastest.js

For Android out APK Size = 20mb


Image ref
Left side Web build vs Webgl build at rightside



Supports : Desktop versions of Firefox and Chrome
Not supported:(from unity site)
  •     Runtime generation of Substance textures
  •     MovieTextures
  •     Networking other then WWW class
  •     Support for WebCam and Microphone access
  •     Most of the non-basic audio features (anything beyond basic positional playback of audio is not supported).
  •     Script debugging
  •     Threads    Any .NET features requiring dynamic code generation (just as on other AOT platforms like iOS)
  •     Runtime GI
Tip : work with "Slow(fast builds)"  and release with "Fastest(very slow builds)"


Upcoming more on webgl and unity5 topics like how to publish a unity webgl game online, how to run unity5 build on chrome...