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 ... 16 17 [18] 19 20 ... 23
256
DOTween & DOTween Pro / Re: DOTweenAnimation question
« on: June 08, 2015, 01:50:51 PM »
Wohooo :)

257
DOTween & DOTween Pro / Re: DOTweenAnimation question
« on: June 08, 2015, 01:24:44 AM »
I am super-confused indeed :D

If you want to see if all the DOTweenAnimations of a gameObject have played, you could first get the tweens (if you call GetTweens() from any of the DOTweenAnimations, you will get a List<Tween> of all the DOTweenAnimations on the same gameObject), then check if all of them return TRUE with IsComplete.

To know how many times have played though, you will need a custom check for the first activation, since there's no existing tween method/property otherwise.

Did I get it right? Did I? :D

258
DOTween & DOTween Pro / Re: A getter for the Tween.Loops
« on: June 07, 2015, 12:25:34 AM »
Hey Shannon,


Sorry for the delay, I was out of town. I added this to my todo list, and will add it as soon as I solve an issue I have with a new feature.


Cheers,
Daniele

259
DOTween & DOTween Pro / Re: Warning during iOS build&run
« on: May 31, 2015, 09:47:40 PM »
Glad it's solved :)

260
DOTween & DOTween Pro / Re: OnPlay callback issue
« on: May 31, 2015, 08:32:42 PM »
I still think (because we all hate 4B :D) that it might be done differently. Check the example package I'm attaching (requires but doesn't include DOTween) with a similar approach. That way, you would simply create a reusable tween at startup, and your Fade method should take care directly about activating/deactivating its gameObjects.

About nesting a tween more than once, that is absolutely forbidden! You're not nesting a clone of a tween, but the tween itself, so it can be used only once. You should get a warning when you try to do that, and if you don't I'll check out why you're not getting it.

261
DOTween & DOTween Pro / Re: Warning during iOS build&run
« on: May 31, 2015, 07:58:06 PM »
Actually, I just realized I was using an incorrect term in the search. I found this thread. Is it possible that you copy-pasted DemiLib.dll, and ended with an additional file in the Project called DemiLib 1.dll? If so, you should delete it.

262
DOTween & DOTween Pro / Re: Warning during iOS build&run
« on: May 31, 2015, 07:55:36 PM »
Hi Shannon,

I honestly never heard of that log, nor can I find any reference to it on the internet. When do you get it? As soon as you import? When building?

That said, there should definitely nothing to be worried about. DemiLib is only used inside the Editor, to make nicer Inspectors for DOTween Pro.

Cheers,
Daniele

263
DOTween & DOTween Pro / Re: LineRenderer in DOTween PRO
« on: May 30, 2015, 01:44:02 PM »
Voilą :)

If you didn't already do it, update to DOTween Pro's latest version, then overwrite the Demigiant/DOTween folder with the one attached here. After that, you can do:

Code: [Select]
myDOTweenPath.GetTween().PathGetDrawPoints();
to get a series of points you can use to draw the path at runtime. Note that PathGetDrawPoints also accepts an optional parameter to tell it how many subdivisions per segment to create. The higher the subdivisions, the more points will be generated and the more curved it will look when drawn (in case of curved paths: it's completely ignored in case of linear ones). The default value, 10, should be already ok anyway.

Here is also an example MonoBehaviour that I used to test it:

Code: [Select]
using UnityEngine;
using System.Collections;
using DG.Tweening;

public class PathsWDrawPaths : MonoBehaviour
{
public DOTweenPath path;
public int subdivisionsXSegment = 10;
public Color startColor = Color.white;
public Color endColor = Color.white;
public float startW = 1;
public float endW = 1;
public Material material;

void Start()
{
Vector3[] drawPoints = path.GetTween().PathGetDrawPoints(subdivisionsXSegment);

int pointsCount = drawPoints.Length;
LineRenderer lr = path.gameObject.AddComponent<LineRenderer>();
lr.material = material;
lr.SetColors(startColor, endColor);
lr.SetWidth(startW, endW);
lr.SetVertexCount(pointsCount);
for (int i = 0; i < pointsCount; ++i) lr.SetPosition(i, drawPoints[i]);
}
}

264
Hello!

Taking the target's value from the tween itself is not really doable, but why can't you just check your property value directly?

265
DOTween & DOTween Pro / Re: OnPlay callback issue
« on: May 30, 2015, 02:52:14 AM »
OnPlay inside nested elements of a Sequence is indeed a complex beast. But can't you add an OnPlay to the Sequence itself, rather than to the nested tweens, and enable/disable all elements when the Sequence itself restarts (as in rewinds+plays)/completes?

I say this because I really would want to avoid another callback, since even if not used it would still add 4B to every Tweener/Sequence :P

266
DOTween & DOTween Pro / DOTween Pro Upgrade instructions
« on: May 29, 2015, 11:37:50 AM »
Upgrading from versions older than 0.9.255
New versions greatly optimize DOTweenAnimations startup, but require all animations to be reassigned. It's very simple, don't panic. Just select each gameObject that has a DOTweenAnimation attached (one by one, not all together) then save your scene: that is enough to update it automatically.
In case you should forget, a warning will appear while playing, telling you exactly what to do and which gameObject to select.

Upgrading from versions older than 0.9.100
When you upgrade to DOTween Pro 0.9.100 or later versions, you will get some "Missing Component" warnings in Unity's console. Drag & drop the DOTweenAnimation Component (from the Demigiant > DOTweenPro project folder) to the Script field of each of those Components, and you'll get all your animations back, with the settings you previously stored.

267
DOTween & DOTween Pro / Re: LineRenderer in DOTween PRO
« on: May 29, 2015, 10:26:01 AM »
I'm adding this to my todo list. I'm working on other DOTween Pro features right now, but I'll see if I can push this forward, since it shouldn't be too difficult.

268
DOTween & DOTween Pro / Re: OnPlay callback issue
« on: May 29, 2015, 10:22:58 AM »
Hi!

OnPlay is fired when a tween changes from a paused state to a playing state. So when calling Restart, OnPlay will fire if the tween was paused, otherwise not. Calling Rewind + Play always fires it instead, because Rewind rewinds+pauses, so when you call Play after that, you're actually changing its playing state.

Cheers,
Daniele

269
DOTween & DOTween Pro / Re: LineRenderer in DOTween PRO
« on: May 28, 2015, 08:39:29 PM »
Hi,

Sorry but no, lines are only drawn as a visual cue in the Editor, not in the game itself.

Cheers,
Daniele

270
Hi,

Could you check if you have this same issue with v1.0.606 (you can download it from here, just click on the "Old versions and Changelog" title to show all old versions)?

By the way, here's also a temporary fix in the meantime. I believe this error happens only if you have a nested callback (like OnComplete) that is fired at the end of a Sequence. But if you add an OnComplete to the Sequence itself that should always happen correctly.

Pages: 1 ... 16 17 [18] 19 20 ... 23