LeanTween WebGL Exporting

I finally had a chance to get my hands on the new Unity5 beta and it’s WebGL exporting. Thankfully the Unity folks have done a thorough job with this exporter and I am not seeing any issues with the current version of LeanTween. When they came out with Flash exporting it took some finagling to get it work correctly, but this time it just seems to work immediately (amazing when that happens!).

Here is an example of my C# test scene running in marvelous WebGL!

Beware it is a 20mb file for the javascript file! That is after all the byte-stripping was turned to the max (and optimization turned to fastest), before it was 24mb. Compared to Flash’s 2mb overhead, this seems pretty bloated. However this is still in the beta phase, and they have mentioned the end goal to get it down to 10mbs, which I hope they will make progress on this. Because of the large file size, it will mostly be best used for games and interactive experiences, it doesn’t look like anyone will be building Flash banners in Unity3d anytime soon!

With the news that Chrome will be pulling support for all plugins by the end of 2014, an alternative to Unity’s Web Player can’t come soon enough. I hope they can bring down that build size though. In any case it’s really a technical marvel they can get their code running at at all (and at decent speeds!). This a good slide-show on how they use an optimized subset of javascript to AOT-compile (Ahead of time compile) the code to gain much faster performing javascript.

Flash exporting still works with LeanTween, but as Unity officially stopped supporting it awhile ago, this will become less and less relevant…

However since Chrome and other browsers are likely to continue to support flash for awhile it’s still a good alternative (Chrome has it’s own version of flash, so I guess it’s not technically a plugin?). You can still download Unity 3.5.7 and export to Flash using the free version (also I can export using the latest 4.5 since I bought the license when it was still available).