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 - Daniele

Pages: 1 ... 6 7 [8] 9 10 ... 23
106
DOTween & DOTween Pro / Re: How to smoothly kill an infinite loop sequence
« on: November 23, 2015, 12:04:35 PM »
You're right about the TweenCallback, I forgot that Restart has overloads, so it requires to be a lambda.

Code: [Select]
void SmoothKillTween()
{
   myTween.SetLoops(0);
   myTween.Complete();
   myTween.Kill(); //?
}

This won't work, because you're simply forcing the tween to complete instantly. With the method I wrote instead, you're telling the tween to go on playing until the end of the loop, and then it will kill itself automatically (which sounds creepy written like this :D).

107
DOTween & DOTween Pro / Re: Problem with multiple OnComplete functions
« on: November 23, 2015, 12:00:37 PM »
Hi,

I never thought of using DelayedCalls inside an OnComplete callback, that is interesting. But no, there is no limit on calls. Can you write me an example of a non-working version, so I can test it out and see what's happening?

By the way, why are you using this approach and not a Sequence? Just as a note, a Sequence would be slightly more performant.

Cheers,
Daniele

108
DOTween & DOTween Pro / Re: DoShake on Camera position has drift
« on: November 20, 2015, 11:30:03 PM »
Hi,

DOTween doesn't have an override manager, because of its architecture (and because it would require Reflection, which I really want to avoid). So yes, multiple tweens will fight each other and especially on a Shake tween drift will happen, because the starting position will vary each time. I strongly recommend killing (actually, better completing it in this case) the previous tween manually before starting a new one on the same properties.

Cheers,
Daniele

109
DOTween & DOTween Pro / Re: DOTween adds 5M to IL2CPP builds
« on: November 19, 2015, 04:03:12 PM »
Thanks, let me know what they have to say. I'm afraid I don't have any workaround. I payed special attention at not using any special .NET libraries with DOTween, exactly to keep the weight minimal. If Unity is increasing it so much it can only be a bug with DLL conversion to IL2CPP, and I'm afraid there's nothing I can do on my side :/

110
DOTween & DOTween Pro / Re: Kill nested Sequence
« on: November 19, 2015, 12:23:00 PM »
I'm sorry but no, I don't plan to implement this. The reason is that a Sequence is strongly tied to its nested tweens, because, for example, one tween could animate a property in one way, while the next could animate the same property in another, and so the Sequence actually creates a kind of cache based on each internal animation and on the consequences it has on the other ones. Allowing to control nested tweens would completely break this approach and it would make a mess :P

111
DOTween & DOTween Pro / Re: Kill nested Sequence
« on: November 19, 2015, 12:08:14 PM »
Hi!

Once you add a tween to a Sequence, the main Sequence is the only thing that can be controlled. Nested tweens cannot. Consider that a Sequence is like a movie timeline composed of other movies/tweens. Once you create the main Sequence, it's "rendered" and only that can be controlled.

Cheers,
Daniele

112
DOTween & DOTween Pro / Re: CHRONOS support, kinda works ... but ..
« on: November 18, 2015, 04:34:21 PM »
Hellow!

Other than "timeline" being NULL, the only other thing that might be happening is that it's an inner exception thrown by Chronos when setting the timeScale. Are you using the latest-est version of DOTween (here)? That should give you more information about the type of exception.

Cheers,
Daniele

113
DOTween & DOTween Pro / Re: DOTween adds 5M to IL2CPP builds
« on: November 17, 2015, 11:22:36 AM »
Hi,

I investigated some more, and this still seems very very weird. Could you open a bug report with Unity with your example? DOTween is a very lightweight library, that only uses basic system classes available in regular Unity projects. If IL2CPP really is increasing 245kB to 6MB that seems like a pretty big issue on Unity's side, which I suppose they're working on fixing (considering that IL2CPP is still beta).

Let me know.

Cheers,
Daniele

114
DOTween & DOTween Pro / Re: DOTween adds 5M to IL2CPP builds
« on: November 15, 2015, 04:48:10 PM »
Hi,

I can't test IL2CPP builds directly, but that seems extremely wrong and weird. All DOTween and DOTween Pro build files are a total of just 245kB (inside Unity Editor they have more weight, but only for editor stuff: most of the files are not considered for builds).

What I think is happening, is that Unity creates a blank build (without Unity GUI libraries and probably some UnityEngine stuff) if you don't import anything at all, but importing DOTween "activates" Unity itself, and so it creates a real empty project after that. Can you try recreating a blank project, then creating a blank scene just with some cubes and a couple UI elements, and exporting it again?

Cheers,
Daniele

115
Hi!

When you play backwards a tween, it will play backwards from its current position, loops included, until it reaches the start of the tween. In short, the tween is treated as if it was a movie timeline, where the loops were part of the timeline itself. This means that, even if you set infinite loops, if you play backwards after 3 loops only 3 loops will elapse before the tween reaches its beginning and stops.

You could use a trick here though. After creating the tween with infinite loops, use Goto (or DOGoto if you're using a target shortcut instead of a tween reference) to send the tween to a time position that is, for example, after 10000 loops. That way, when you play backwards, it will have to go through 10000 loops before it stops.

Cheers,
Daniele

116
Hello!

Took the time to try it out. First one note: you can't initialize the Sequence variable by calling DOTween.Sequence. You have to do that inside a method (Start or whatever) or you'll get a thread-related error. I don't think that was your case though, since that happens only if the script is called in the first frame of your project.

Everything else works perfectly here, which means:
- The Sequence starts
- After 7" anchorMax plays (interval of 5" plus 2" delay set on tween)
- After 2" more anchorMin plays (join with previous plus 2" delay)
- After 2" more anchorPos plays (join with previous plus 2" delay)
- After 5" more scale plays (append after the end of the previous - which lasts 1" - plus 2" interval plus 2" delay)

Also, the Pause, if set, is correctly working too. Let me know.

Cheers,
Daniele

117
Hi, glad you like DOTween :)

I have a couple of doubts about your code. Are you paying attention not to reuse the same Sequence multiple times (that can't be done)? Also, are you using the latest version of DOTween (1.1.060)?

Cheers,
Daniele

118
DOTween & DOTween Pro / Re: LineRenderer in DOTween PRO
« on: November 12, 2015, 01:47:12 AM »
Weird, first time I hear about that. Thanks for letting me know.

119
DOTween & DOTween Pro / Re: LineRenderer in DOTween PRO
« on: November 11, 2015, 07:56:30 PM »
I just checked and it's there indeed. Are you sure you imported the correct namespace? It's DG.Tweening, not just DG.

120
DOTween & DOTween Pro / Re: How to detect collisions during a Tween ?
« on: November 07, 2015, 08:31:05 PM »
Great! :)

Pages: 1 ... 6 7 [8] 9 10 ... 23