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 ... 14 15 [16] 17 18 ... 23
226
DOTween & DOTween Pro / Re: CanvasGroup fade
« on: July 06, 2015, 06:20:30 PM »
Done :)

P.S. You need to have access to DOTween Pro's private download area to see that link. To do that, follow these instructions.

227
DOTween & DOTween Pro / Re: CanvasGroup fade
« on: July 05, 2015, 10:31:22 PM »
Hey,


Sorry if it's not ready yet, but I'm encountering some issue which I need to fix first. Hope to have it done within tomorrow evening or the day after max.

228
I understand. Then you can either use code or IDs.

With code, you'll need to get all the tweens on the gameObject (with myDOTweenAnimation.GetTweens()): they will be returned in order from top to bottom. With those, you can control which one to play (remember that you can't run two tweens on the same property at the same time, because they will "fight" each other).

Otherwise, you can simply add an ID to each DOTweenAnimation, and use DOPlayById or DORestartById.

229
DOTween & DOTween Pro / Re: Check progress of an active tween
« on: July 05, 2015, 06:44:20 PM »
myTween.Elapsed(), with optional parameter to consider loops or not :)

230
Hi again Jos!

I'm afraid that would be rather complicated. I had built something like that for HOTween, but having both a target-less Sequencer and a DOTweenAnimation engine on the same project would require a lot of work. I'm adding it to my todo list though, but on the "maybe" section :)

In the meantime, you can use a trick. You know that, if you use DOTween via script, you have Sequences, which do exactly what you mean to (and please mind, the tweens added to a Sequence don't need to be in a sequence: they can overlap each other—I know, bad naming choice)? So you could either script those animations or, if you want to use the visual DOTweenAnimation editor, do something like this:
  • Create all DOTweenAnimations as usual, but uncheck autoPlay (otherwise you won't be able to add them to a Sequence)
  • Create a script which accepts a public array of DOTweenAnimations, and drag all gameObjects with DOTweenAnimations there
  • Via script, get all the tweens created by those DOTweenAnimations (using myDOTweenAnimation.GetTweens(), which returns an array of all DOTweenAnimations on a single gameObject)
  • Now you can append those tweens to a Sequence and control them as a single tween

231
Hello (and thanks for buying!),

Sadly Unity doesn't allow to specify which DOTweenAnimation you're dragging on a Component's variable, so when you drag those 2 animations there, it will actually assign them as the same one.

That said, in your case there's a much better way to do what you mean to. Create only one DOMove animation, which will move the panel on-screen. Deselect autoPlay (so you can control it via your other gameObject) and autoKill (so it can be re-used after it's complete). Then when you want to show the panel, call DOPlayForward(), and when you want to hide it DOPlayBackwards().

Hope this was what you were looking for :)

Cheers,
Daniele

232
DOTween & DOTween Pro / Re: DOTweenPath
« on: July 04, 2015, 02:04:11 AM »
Hi,

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
tween.OnWaypointChange(WaypointChangeCallback);
// Set the playhead to a specific waypoint
tween.GotoWaypoint(2);
// Set the playhead to a specific time
tween.Goto(2);

You can find more info about those methods here.

233
DOTween & DOTween Pro / Re: CanvasGroup fade
« on: July 02, 2015, 08:49:56 PM »
Hi,


Are you talking about DOTween Pro and the visual editor by any chance? If so, Fade isn't actually available for CanvasGroup objects: adding it to my todo list (should be done within Saturday, I hope).


Cheers,
Daniele

234
DOTween & DOTween Pro / Re: Cancel or reset DOTweenAnimation by id
« on: July 02, 2015, 07:31:05 PM »
Hi,

Once you set a tween's id (via SetId), every static control operation accepts it as a parameter. For example:
Code: [Select]
// Pause all tweens with the given id
DOTween.Pause(myId);
// Kill all tweens with the given id
DOTween.Kill(myId);
// etc

235
Are you calling DOTween.Clear (or ClearAll) at any point before the error happens?


Can you check the DOTween version by going to Tools > DOTween Utility Panel, and see what's written there?

236
DOTween & DOTween Pro / Re: Callback ordering
« on: July 01, 2015, 08:27:15 PM »
Callbacks that happen at the same time may happen randomly due to the storage logic. If you want to append two callbacks at the same exact moment, I'd recommend using a single one and adding multiple functions to it:
Code: [Select]
seq.AppendCallback(() => {
   Debug.Log(1);
   Debug.Log(2);
});

237
DOTween & DOTween Pro / Re: Pause, Restart, Rewind not working
« on: June 30, 2015, 09:42:05 PM »
Hi,

When you add a tween to a Sequence you can't control it anymore, because it's the Sequence that controls it. But: you can control the Sequence. So just assign your Sequence to a tween variable and you're done:

Code: [Select]
sequence = DOTween.Sequence()
// ...
sequence.Pause();

By the way, remember that if you want to reuse your tween/sequence after it's complete, you have to chain a SetAutoKill(false) to it, to prevent the tween to be automatically destroyed after completion.

Cheers,
Daniele

238
DOTween & DOTween Pro / Re: Incemental Timing
« on: June 29, 2015, 08:54:37 PM »
I'm happy about that! :)

239
DOTween & DOTween Pro / Re: Incemental Timing
« on: June 29, 2015, 08:41:14 PM »
Hi!

If you want a pause to happen after each loop run, you should use Sequences, like this:

Code: [Select]
DOTween.Sequence()
   .Append(myTransform.DORotate(new Vector3(0, 90, 0), 2))
   .AppendInterval(5)
   .SetLoops(-1, LoopType.Incremental);

Cheers!

240
DOTween & DOTween Pro / Re: If Statement and Sequences
« on: June 26, 2015, 12:07:07 PM »
If your whole tween moves by one integer, and you just want to check if it's complete, it would be better if you stored the Sequence as a class variable, then check if it's complete or not (via IsComplete):
Code: [Select]
if (mySequence.IsComplete()) {
   // sequence complete
}

Pages: 1 ... 14 15 [16] 17 18 ... 23