Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - par

Pages: [1]
1
DOTween & DOTween Pro / Re: DOPath callback on reaching each waypoint?
« on: January 09, 2016, 09:04:28 PM »
Hmm... and is it possible to send the tween object itself (or any other parameter) into the OnWaypointChange() method like we do the normal callback lambdas?

Thanks!

PAR

2
DOTween & DOTween Pro / Re: DOPath callback on reaching each waypoint?
« on: January 09, 2016, 07:21:39 PM »
Um... quick question on DOPath though.... It seems as if its returning to the starting position.  I was assuming that when the last waypoint was reached the tween would stop.  Is this possible w/ DOPath?  I didn't see a DoSpline type method...

PAR

3
DOTween & DOTween Pro / Re: DOPath callback on reaching each waypoint?
« on: January 09, 2016, 06:59:05 PM »
Well crap, how did I miss that?  I apologize and thank you!

PAR

4
DOTween & DOTween Pro / DOPath callback on reaching each waypoint?
« on: January 09, 2016, 06:27:34 PM »
Is it possible to run a DOTween DOPath tween but have a callback that is... well called every time the tween hits one of the waypoints in it's array?

Thanks!

PAR

5
DOTween & DOTween Pro / Re: Retrieving tween object from callback function
« on: December 15, 2015, 06:27:51 PM »
Awesome, I actually like this more than a lot of other patterns used for this type of thing.  Passing in the reference is way cleaner than searching in some monolithic static class.

Thanks!

PAR

6
DOTween & DOTween Pro / Retrieving tween object from callback function
« on: December 15, 2015, 06:21:51 PM »
How would I access the actual tween that is responsible for the callback?

Code: [Select]
     public void someMethod(Transform transform) {
          transform.DOScale(Vector3.zero, 1).OnComplete(doSomethingAfterTween);
     }

     public void doSomethingAfterTween() {
          Tween theTween = ????
     }

Thanks!

PAR

7
Great!  Thanks much for your responses and I look forward to testing this all out!

And I looked at your API and yes, that would have been wonderful if it had worked.  Bummer you had so much trouble with it.

Cheers!

PAR

8
Thanks much for the fast reply!

1) Ok, ya I read your official docs and, while they cover the basics it would be nice to have a full API reference.  And I ask this as a purchaser of the Pro version, I would never expect it w/out paying :P
2/3) So you're saying that whatever is used in your shortcut methods, the tween's target is always that object?  So is the following accurate?
  • Tween one = transform.DoMove();  -> one.target = (UnityEngine.Transform)transform?
  • Tween two = image.DOColor(); -> two.target = (UnityEngine.UI.Image)image?
If this is the case I can appreciate it.  The safe thing to do during a production application would be to check the type on these before using them but if you have hundreds of them per frame, the check will be a performance hit.
4) Tween one = transform.DoMove(); List<Tween> onesTweens = DOTween.TweensByTarget(one.target)?
If the list is long, how do I check which tween is which in a performant way?  A shortcut would be an id or enum that I could place on the tween and just check equality but if I dont have that what would be your suggested way?

I usually always keep references to things so I can avoid the performance hit of doing searches (i.e. I never do GameObject.GetComponent<Whatever Component> as that is a performance hit).  But there are definitely times I will need to check what is what.

Thanks again!

PAR

9
New to DOTween, was lured in by all the good reviews.  This means I am retrofitting my code from my current tween engine to DOTween.

I lean towards coding rather than using the Unity GUI for doing anything, this way I can have complete control of whats going on.

  • Is there an API doc listing all of your packages, classes, public types, functions, attributes, etc?
  • What is the relationship between a tween and a GameObject?  I see a tween.target method but it returns an "Object".... is this a GameObject or a Transform or... ?
  • How do I get the GameObject (or Transform) that a tween is associated with?
  • How do I get the tween from the Transform (or GameObject) that I know had a tween associated with it?

There are many reasons why one would want this info.  One simple example is GameObject reuse.  If I have a list of GameObjects that go obsolete at the end of an animation (tween), I don't necessarily want that GameObject to be destroyed, I want to reuse it (or perhaps I really do want that destroyed.. all depends on the situation).  That means it would be nice to know all of the relationships between your framework and Unity's as depending on the use case, I might have a list of tweens that I set off or I might have a list of GameObjects/Transforms that I want to manage.

Thanks much!

PAR

Pages: [1]