If you didn’t already know Unity 3.5 Developer Preview is now available to the public.
http://unity3d.com/unity/preview/
To me the most exciting thing in the developer preview is the Unity to Flash exporter. The ability to easily create and distribute 3D content on the web without needing the user to have a different plugin.
So the first thing I did was start to port over some older projects. As this is an early build there are a lot of limitations, so moving an existing complex project over isn’t an easy task. One of the major stumbling blocks I had (and from the sounds of things a lot of people are having) is that iTween simply doesn’t work.
iTween is great framework for doing tweening in Unity. So I decided that with my deep knowledge of Unity, iTween and AS3 I would attempt to ‘fix’ the iTween libary to work with the Flash exporter.
Turns out iTween uses a lot of unsupported features and that coupled with the exporter being very new, turned this into a very challenging problem.
45+ hacks and a lot of knowledge later, I won.
Without further ado here is Flash export ready version of iTween: iTween.cs
Here is a quick demo proving it works: SimpleCrateDemo
This version of iTween is a little rough around the edges, but it works in my initial tests.
Known Issues
-ColorTo & ColorFrom are unsupported as they cause an infinite loop (reason unknown)
-FadeTo & FadeFrom are unsupported as they cause an infinite loop (reason unknown)
-Flash player throws a silent error on Destroy of iTween component (should not effect anything but will show up in Flash debug)
There are probably more issues so let me if you come across any.
I do know that a new version of iTween is being worked on and the Flash exporter is in an early state so this is a temporary version to hold everyone over.
PS: This took me an entire day, so if someone uses this to win the Unity ‘Flash in a Flash’ contest you official owe me a drink.