LeanTween Editor - Released!

LeanTween now supports animation along Bezier curves, and this editor gives you a visual system in which to create them!

Create one Bezier curve or a complex set of Bezier curves. Get started quickly using the easy path creator, which allows you to create many different types of paths with customizable values such as: rounded squares, snakes, circles, and random paths.

Animating along bezier curves comes in handy in many situations, such as creating a simple waypoint system, animating bullets or other projectiles, vehicle simulation paths.

Complete C# and Javascript examples included!

Asset Store Link

1300232--60383--$ScreenShot1.jpg

1300232--60384--$ScreenShot2.jpg

1300070--60367--$ScreenShot3.jpg

Hopefully this will be just the start of helpful editor components I can provide for LeanTween. At the moment this seems like the most important piece to add, but I am open to suggestions for additional Visual helpers to add to this set.

The node editor should be like “Simple Waypoint System”. Where you can add, edit, move, delete nodes easily.
http://forum.unity3d.com/threads/115086-Simple-Waypoint-System-(SWS)-RELEASED

An update has been made to the LeanTween Editor. The editor has been made simpler to work with the node points of the curves, you can now rotate scale and move the created curve much like you can any other Unity game object in the editor.

Please note if you are already using the editor there are some changes you will have to make with your code to use this new update. These changes are relatively minimal and are outlined here: http://forum.unity3d.com/threads/199634-LeanTween-Editor-Update-Notes

A new version of LeanTween Editor is being released that supports the new LeanTween 2.0. This system will be only based on the C# plugin, so users who don’t want to re-make their curves on a current project, it is best to continue using LeanTween 1.1 (also included in a zipped up version, from the asset store).

A new version is available that updates the code to work with the new LeanTween 2.0 style.

New features planned soon! Get the editor now, before the price goes up…

Hi, any information what features are planned?

Hi Sloopidoopi,
The new features are out! It includes a new Visual Editor, for making tweens:

You can see a video of it in action here:

I want to thank Tony at Trinnovations for getting this wonderful visual edtior started!

Next for future updates I am planning on adding support for Catmull Splines, and adding more to the Visual Editor…

Looks great!
Is it possible to mix the visual setup with code? I mean starting and stopping tweens via code but do the setup with the editor?

Thanks! Yes you can have it start the group of tweens on enable. So just activate enable with code, and the grouping of tweens will start.

I have also thought of maybe adding a way to copy and paste the resulting code… so you can go use it as a starter, and than you would have more control of the specifics by using the generated code. But I have not done that yet, let me know if that sounds appealing though…

This would be a great feature!! With such a solution you have the best from both worlds.

Great project,

I would like to have an in-game animation editor. Is this possible ?

Cheers.

Thanks! Well Unity has it’s own animation window where you can specify animations on a timeline: http://docs.unity3d.com/Documentation/Components/AnimationEditorGuide.html , so I am not sure if it would be worth remaking that… Is that what you meant?

Sorry I wasn’t very clear.

What I meant to ask is an in-game tweening editor. Something like your LeanTween Editor for run time. What could also work is exposing the core functionality of the LeanTween Editor so that developers can use the API during game play.

Ahh, now I gotcha. Yeah that should totally be possible. You could build the tweens in much the same way as the Visual Editor does, just doing in it during runtime.

Cool, does LeanTween Editor have a run time API ?

It would be the same as the normal API. Here is a snippet from the LeanTween Editor, which basically shows how it is constructing a new LeanTween action based on inputs:

LTDescr tween;
					float delay = item.delay + group.delay + overallDelay;
					if(item.action == TweenAction.ALPHA)
					{
						tween = LeanTween.alpha(gameObject, item.to.x, item.duration);
					}
					else if(item.action == TweenAction.ALPHA_VERTEX)
					{
						tween = LeanTween.alphaVertex(gameObject, item.to.x, item.duration);
					}
					else if(item.action == TweenAction.MOVE)
					{
						tween = LeanTween.move(gameObject, item.to, item.duration);
					}

... some actions taken out for brevity

					else if(item.action == TweenAction.ROTATE_Z)
					{
						tween = LeanTween.rotateZ(gameObject, item.to.x, item.duration);
					}
					else if(item.action == TweenAction.SCALE)
					{
						tween = LeanTween.scale(gameObject, item.to, item.duration);
					}
					else if(item.action == TweenAction.SCALE_X)
					{
						tween = LeanTween.scaleX(gameObject, item.to.x, item.duration);
					}
					else if(item.action == TweenAction.SCALE_Y)
					{
						tween = LeanTween.scaleY(gameObject, item.to.x, item.duration);
					}
					else if(item.action == TweenAction.SCALE_Z)
					{
						tween = LeanTween.scaleZ(gameObject, item.to.x, item.duration);
					}
					else
					{
						tween = null;
						Debug.Log("The tween '" + item.action.ToString() + " has not been implemented.");
						break;
					}

					tween = tween.setDelay(delay);
					tween = item.animationCurve!=null ? tween.setEase(item.animationCurve) : tween.setEase(item.ease);
					if(item.between == LeanTweenBetween.FromTo)
					{
						tween.setFrom(item.from);
					}

Hi guys.

I just bought Lean Tween Editor but I’m having a small issue. I’m get NullReferenceException when I click Reverse Path Direction.

Here is the error log.

NullReferenceException: Object reference not set to an instance of an object
LeanTweenPathEditor.OnInspectorGUI () (at Assets/LeanTweenEditor/Editor/LeanTweenPathEditor.js:260)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[ ] editors, Boolean eyeDropperDirty)
UnityEditor.DockArea:OnGUI()

Am I doing something wrong?

Thanks for pointing this out Yuri Kimo, you are correct this is a bug. I have put a fix in for this, that I am submitting to the Asset Store now (I’ll send you the fix directly as well).

Hello,

Is there a built-in way in Lean Tween Editor to begin tweening along a path but have it start a certain time (or ratio) offset from the beginning of the path? I haven’t been able to find an easy way. Basically, do you always have to travel the length of the whole bezier path?

Thanks

Sorry, I ended up searching the source code and found it and it works perfectly!

LTDescr.passed = time;

Assign that property and the tween will begin there. The best tweening library, I’ve tried them all now!

1 Like