The first update for the iTween Visual Editor is out. Version 0.2 brings support for the path parameter of MoveTo and MoveFrom. So you can now set up your beautiful curved path tweens. Other changes include the way callbacks work and a slight reorganization of where the Editor folder lives (thanks Bob!). The param part of the callback (oncompleteparams, onupdateparams, etc.) has been changed to a string which I figured was maximally flexible. I’ve tested the callbacks a bit so I know they at least superficially work ok (calling a method on a specified object and passing in a string to the receiver). I’m very open to suggestions on what kinds of use cases people have for the params. I could support more values but it’s a lot of work when it can be any of X different types so I’d like some fairly concrete use cases.
Please visit the main page for the visual editor as that is the only spot kept up to date.
Update: Fixed! Well, worked around, which is just as good.
There is a Unity bug that is causing lots of problems right now. Until this is fixed I would recommend not using the visual editor.
If you’ve been around the Unity world you may have run into the iTween library. It’s a system for animating various thing in your scene, from positions to rotations to scales to color, and even sound volume! It’s a pretty nifty library but I felt it was missing some usability. For example, in a scene if all I want to use iTween for is to have an object float across my screen repeatedly, I’d need to create a whole class just for one line of code such as this:
On a one-off basis this wouldn’t be bad, but what if you were making a game where you had lots of levels and each one had some subtly different values for the movement pattern of the objects in it. Well, you’d be writing a lot of tiny throwaway classes which really clutters up your project and is just plain annoying. So I got to thinking about how you could write a script you attached to your GameObject that could store the data for a tween and then activate the tween when the scene starts (or wait until it’s activated programmatically). The result is the iTween Visual Editor which can make even fairly complex tweens quite simple. Here is a tween that is moving the GameObject to the camera’s Transform while looking at position (10,0,0 and using an inOutCubic easing type and finally using a pingPong loop type.
Usage is pretty simple. Just attach an iTweenEvent component to the GameObject you want to tween (you can also use the Component/iTween/iTweenEvent menu item). Then choose the type of tween you want and the options for that tween. Click play to see your tween in action.
NOTE: This only works with Unity 3.0 and later, it will not compile under Unity 2.6.
Please submit any bug reports or suggestions to david (at) koontzfamily (dot) org