LeanTween WebGL Exporting

LeanTween WebGL Exporting

Nov 16

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).

2 comments

  1. Indy

    What do you think about WebGL performance and Unity? I can’t see this “almost native” performance when I look at CPU usage compared to Flash or UT Webplayer.
    Your great LeanTwean also show how this difference is huge.

    • I agree, I remain suspicious about the “almost native” claim. At least with my tests it looks to run a little choppy (I am using Chrome). But I am still impressed it runs at all, and with Flash looking to be a less and less supported platform, I am glad we have this other option (even though it still has some hurdles to overcome).

Leave a Reply