Demigiant Forum

Unity Assets => DOTween & DOTween Pro => Topic started by: Jo Simard on July 03, 2015, 08:42:32 PM

Title: DOTweenPath
Post by: Jo Simard on July 03, 2015, 08:42:32 PM
I am playing with the DoTweenPath editor extension,  but using code I can't find documentation or how to:

I feel that having the source code we could understand faster and extend/customize this feature for our games.
Greensock is a good business model example where members-only features always came with the source code.
I can also see more and more asset store developers are opening their source to gather more momentum and collaborators around their products.
Title: Re: DOTweenPath
Post by: Daniele on July 04, 2015, 02:04:11 AM

I love Greensock, but the reason why DOTween's code is not lose scripts is tied to the fact that namespaces and the internal keyword work very differently in ActionScript and C#. I initially wanted to make DOTween as lose scripts, but a decent API would've been truly impossible (not to mention the speed of compilation and other features that a pre-compiled DLL allows).

If you're curious about DOTween's code, its open source is here ( Though indeed it's missing the Pro part, which I wouldn't know how to share right now.

That said, if you want to do the stuff you wrote, you'll have to get the DOTweenPath's tween (myDOTweenPath.GetTween()) and use the open source libraries with it:

Code: [Select]
// Get the tween
tween = this.GetComponent<DOTweenPath>().GetTween();
// Add a callback to know when a waypoint is changed
// Set the playhead to a specific waypoint
// Set the playhead to a specific time

You can find more info about those methods here (
Title: Re: DOTweenPath
Post by: Jo Simard on July 06, 2015, 11:11:35 PM
Hi Daniele,
Thanks for the quick reply!

I did not know the Tween object enough, this makes sense!

I finally did a parallel mini-sequencer that pauses the path tween and do some actions, nothing fancy but it works!
Now I see how I could bind it with specific waypoints!

Also makes sense for the compilation time, hate having to wait hours to iterate!

- Jonathan
Title: Re: DOTweenPath
Post by: Daniele on July 06, 2015, 11:21:39 PM
Glad you're shaping it to your own will (hope that's the right expression)!