Giter VIP home page Giter VIP logo

dotween's Introduction

dotween's People

Contributors

0xdw avatar demigiant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotween's Issues

Allow tweening for long and ulong data types

DOTween makes things incredibly easy and I'd like to see it support more of the primitive data types. My video game project requires unsigned long integers to tween a score display. It would be fantastic if DOTween provided a way to handle this.

IndexOutOfRangeException: Array index is out of range

Original from pavel.oliferovskiy on Google Code (Issue 32):

Hello! I have this exception
in 1.0.030 DOTween
in Unity 5 Version 5.0.0f4 (5b98b70ebeb9)
This happens in my method MyMethod in this order

MyMethod () // workds
// one gazillion other tweens
// some time
DOTween.Clear(true)
MyMethod () // crashes

IndexOutOfRangeException: Array index is out of range.
(wrapper stelemref) object:stelemref (object,intptr,object)
DG.Tweening.Core.TweenManager.AddActiveTween (DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/TweenManager.cs:661)
DG.Tweening.Core.TweenManager.GetTweener[Single,Single,FloatOptions] () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/TweenManager.cs:95)
DG.Tweening.DOTween.ApplyTo[Single,Single,FloatOptions] (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, Single endValue, Single duration, DG.Tweening.Plugins.Core.ABSTweenPlugin`3 plugin) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs:785)
DG.Tweening.DOTween.To (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, Single endValue, Single duration) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs:228)
GameInsight.uGui.PreloaderLogo..ctor (UnityEngine.UI.Image image) (at Assets/_Develop/code/GameInsight/uGui/PreloaderLogo.cs:17)

Deep Profiler Crashes Unity on Startup After Version 1.0.720

Updated to the newest DOTween (1.0.810) and when you connect the unity Deep Profiler and start the project, it crashes on startup. (btw, awesome plugin, use it all the time for everything).

Tried in an empty project with DOMoveX on a simple transform.

Goto with full duration not working

Hi
Thanks to you, I was interested in HOTween and have used it very well.
so also I now have an interest in DOTween.
anyway, I found a bug that give me unexpected result.
following is pseudo-code, and DOTween version is 1.0.346
Thank you.

var seq = DOTween.Sequence();

seq.Insert(0, blahblah);
seq.SetAutoKill(false);

seq.Goto(seq.Duration());        // not working, nothing happens. i think it should be work
seq.Goto(seq.Duration()-0.001f); // working (workaround)

Callbacks are still called even though the sequence was killed

Hi,
I'm seeing a strange issue where killing a sequence does not prevent callback it contains from running. This ends up throwing the following error after an object is destroyed:

I have the following code:

sequence = DOTween.Sequence();              
sequence.AppendInterval(3 * delayFactor);               
sequence.AppendCallback(() => {
this.transform.GetComponent<MeshRenderer>().enabled = !this.transform.GetComponent<MeshRenderer>().enabled;
});

sequence.SetLoops(-1, LoopType.Restart);
sequence.Play();

void OnDestroy()
    {
        if (sequence != null)
        {
            sequence.Kill();
            //sequence = null;
        }
    }

After an object is destroyed I get the following error:
DOTWEEN :: An error inside a tween callback was silently taken care of > The object of type 'BuildingIdleAnimation' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.

Am I missing something here? It seems like killing the sequence does not prevent it from calling the callback it contained?

Thanks!

Completing tween with callbacks

I would like to complete a tween in an instant, including all the callbacks. I found the following doesn't work.

Sequence seq = DOTween.Sequence();
seq.AppendCallback(() => Debug.Log("Doesn't work"));
...
seq.Complete();

Is this expected behaviour? If it is, what could be used as a workaround?

DOTween .dll.mdb files causing problems to Unity UI

When I have DOTween in my project and switch to another window and go back to the editor, the Unity UI doesn't render correctly (especially texts). It only renders when I make some change.
Deleting the .dll.mdb files from DOTween solves the problem.
I also tested this with another asset that has .dll.mdb files (HOTween) and it doesn't cause any problems.

Video showing the problem: https://youtu.be/JcJYweyLJDc
Unity version: 5.1.0f3 (but I had this problem in previous versions too)
DOTween version: 1.0.750

OnComplete isn't called in cases where the origina and target values are equal

Hi,
Unless I missed something, it looks like in cases where a tween is created but no actual movement needs to happen (the target value is the same as the original value) the tween is aborted and its callbacks are not called.
I'm guessing this is an intentional design choice? Doesn't it make more sense for the tween to be totally agnostic about such things and basically run as usual?

Tween callback params

Hi!

I saw in the documentation that the transfer parameters in the callback goes through lambda/closures.
But why not add a transfer custom parameters (eg params[])? Sometimes closures are not desirable. In addition, it would be helpful to have in the callback information about Tween who raised him.

Thanks!

Goto in DOPaths eventually sends object to Vector.zero

Hello again :)

I'm creating DOPaths with Vector3[] waypoints along 1 second duration, so that I can control it's position by passing a float value between 0 and 1.

Let's consider these waypoints:

(-9.9, -4.9, 15.0), (-9.9, -2.4, 10.0), (-9.9, 2.7, 10.0), (-9.9, 5.2, 15.0)

... so I'm just using Gotos to sync the element through this path.

Problem is that these Gotos are sending the object to Vector.zero quite often.

# Is this a bug or I'm getting it all wrong?

PS: Just discovered that PathGetPoint is more stable. But it seems that DoPaths is really creating an unsolicited (0.0, 0.0, 0.0) point before the first one (-9.9, -4.9, 15.0). But still, controlling the position by Gotos is flicking and blinking the element in Vector.zero with a strange behavior. Setting position directly through PathGetPoint works better.

# Why is is this (0.0, 0.0, 0.0) point being created?

Thanks very much.

Division by zero exception when trying to complete sequences

DOTween 1.0.665, Unity 4.6.1f1. Calling Complete() on an unfinished sequence sometimes results in division by zero. Full stack trace:

DivideByZeroException: Division by zero
System.Decimal.Divide (Decimal d1, Decimal d2) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Decimal.cs:626)
System.Decimal.op_Division (Decimal d1, Decimal d2) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Decimal.cs:316)
DG.Tweening.Core.TweenManager.Goto (DG.Tweening.Tween t, Single to, Boolean andPlay, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:542)
DG.Tweening.Sequence.ApplyInternalCycle (DG.Tweening.Sequence s, Single fromPos, Single toPos, UpdateMode updateMode, Boolean useInverse, Boolean prevPosIsInverse, Boolean multiCycleStep) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:294)
DG.Tweening.Sequence.DoApplyTween (DG.Tweening.Sequence s, Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:228)
DG.Tweening.Sequence.ApplyTween (Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:139)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 toCompletedLoops, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:234)
DG.Tweening.Core.TweenManager.Goto (DG.Tweening.Tween t, Single to, Boolean andPlay, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:549)
DG.Tweening.Sequence.ApplyInternalCycle (DG.Tweening.Sequence s, Single fromPos, Single toPos, UpdateMode updateMode, Boolean useInverse, Boolean prevPosIsInverse, Boolean multiCycleStep) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:294)
DG.Tweening.Sequence.DoApplyTween (DG.Tweening.Sequence s, Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:228)
DG.Tweening.Sequence.ApplyTween (Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:139)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 toCompletedLoops, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:234)
DG.Tweening.Core.TweenManager.Goto (DG.Tweening.Tween t, Single to, Boolean andPlay, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:549)
DG.Tweening.Sequence.ApplyInternalCycle (DG.Tweening.Sequence s, Single fromPos, Single toPos, UpdateMode updateMode, Boolean useInverse, Boolean prevPosIsInverse, Boolean multiCycleStep) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:294)
DG.Tweening.Sequence.DoApplyTween (DG.Tweening.Sequence s, Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:228)
DG.Tweening.Sequence.ApplyTween (Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:139)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 toCompletedLoops, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:234)
DG.Tweening.Core.TweenManager.Goto (DG.Tweening.Tween t, Single to, Boolean andPlay, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:549)
DG.Tweening.Sequence.ApplyInternalCycle (DG.Tweening.Sequence s, Single fromPos, Single toPos, UpdateMode updateMode, Boolean useInverse, Boolean prevPosIsInverse, Boolean multiCycleStep) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:294)
DG.Tweening.Sequence.DoApplyTween (DG.Tweening.Sequence s, Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:228)
DG.Tweening.Sequence.ApplyTween (Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:139)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 toCompletedLoops, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:234)
DG.Tweening.Core.TweenManager.Goto (DG.Tweening.Tween t, Single to, Boolean andPlay, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:549)
DG.Tweening.Sequence.ApplyInternalCycle (DG.Tweening.Sequence s, Single fromPos, Single toPos, UpdateMode updateMode, Boolean useInverse, Boolean prevPosIsInverse, Boolean multiCycleStep) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:294)
DG.Tweening.Sequence.DoApplyTween (DG.Tweening.Sequence s, Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:228)
DG.Tweening.Sequence.ApplyTween (Single prevPosition, Int32 prevCompletedLoops, Int32 newCompletedSteps, Boolean useInversePosition, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:139)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 toCompletedLoops, UpdateMode updateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:234)
DG.Tweening.Core.TweenManager.Complete (DG.Tweening.Tween t, Boolean modifyActiveLists) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:503)
DG.Tweening.TweenExtensions.Complete (DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/TweenExtensions.cs:37)
SomeProject.UIEndGameAnimations.Update () (at Assets/Scripts/UI/EndGame/UIEndGameAnimations.cs:40)

Allow tweening for double data types and custom types

I'm working on a project that needs to tween doubles, due to the requirement of massive scaling with extreme precision. It appears that floats are the closest I can get for tweening with DOTween at the moment, is it possible to use DOTween to implement tweening for doubles with double values as targets?

Also, many double values that I'm working with are represented in a custom type similar to Vector3, but instead of floats it uses doubles. Is there support for creating and using custom types?

For example, like the float tween, I'd like to be able to use doubles:
double target = 100000000000000000;
double current = 0.0;
DOTween.TO(()=> current, x => current = x, target, 5);

An example usage with of a custom type:
CustomV3 target = new CustomV3(0.0,0.0,1000000000000000,10);
CustomV3 current = someObject.GetCustomV3();
DOTween.TO(()=> current, x => current =x, target, 15);

Empty Sequence bug

Empty child sequences will mess up the parent sequence.

DOTween.Sequence()
.AppendCallback(() => Debug.Log("Doesn't run"))
.Append(DOTween.Sequence())
.AppendCallback(() => Debug.Log("OK"));

In complex tweens this can cause unexpected behaviour that is hard to track down.

DOTween v1.0.750

IndexOutOfRangeException: Array index is out of range.

DoTween version v1.0.665

This errors started to happen when a big amount of tweens launch at the same time on different objects (100-300 tween). Maybe there is situations when 2-3 similar tweens start on the same object and same parameter.

IndexOutOfRangeException: Array index is out of range.
DG.Tweening.Core.TweenManager.RemoveActiveTween (DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:786)
DG.Tweening.Core.TweenManager.Update (UpdateType updateType, Single deltaTime, Single independentTime) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:400)
DG.Tweening.Core.DOTweenComponent.Update () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/DOTweenComponent.cs:50)

And the second one, similar:

IndexOutOfRangeException: Array index is out of range.
(wrapper stelemref) object:stelemref (object,intptr,object)
DG.Tweening.Core.TweenManager.AddActiveTween (DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:731)
DG.Tweening.Core.TweenManager.GetTweenerColor,Color,ColorOptions (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:97)
DG.Tweening.DOTween.ApplyTo[Color,Color,ColorOptions](DG.Tweening.Core.DOGetter1 getter, DG.Tweening.Core.DOSetter1 setter, Color endValue, Single duration, DG.Tweening.Plugins.Core.ABSTweenPlugin3 plugin) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/DOTween.cs:879) DG.Tweening.DOTween.ToAlpha (DG.Tweening.Core.DOGetter1 getter, DG.Tweening.Core.DOSetter`1 setter, Single endValue, Single duration) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/DOTween.cs:404)
DG.Tweening.ShortcutExtensions.DOFade (UnityEngine.UI.Image target, Single endValue, Single duration) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween46/ShortcutExtensions.cs:70)
CCellArrowMap.setState (ECellArrowState st) (at Assets/Scripts/Objects/CCellArrowMap.cs:32)
CCellArrowMap.Start () (at Assets/Scripts/Objects/CCellArrowMap.cs:63)

OnComplete - Supply Target

My most common use case for OnComplete is to destroy the target after an animation. Something like:

mySpriteRenderer.DOFade(0f, 0.7f)
            .OnComplete(() => Object.DestroyObject(mySpriteRenderer.gameObject));

This works great, but from my understanding it's allocating memory for each closure because of the reference to mySprite. Could OnComplete be overloaded to accept an Action where object is the tween's target?

This would allow for the uglier, code below, but should avoid memory allocation:

mySpriteRenderer.DOFade(0f, 0.7f)
            .OnComplete(target => Object.DestroyObject(((MonoBehaviour)target).gameObject));

Nested sequencedTweens doesn't complete ok Kill method

Hello,

First of all thank you for DOTween!

I use sub sequnces a lot. And I have a problem, when I use DOTween.Kill(gameObject, true);
I expect that all tween will complete, but only top level sequence receive this state.
Moreover sub sequnces/tweens don't finaliase its states.

So I've tried to find some workaround. I've patched TweenManager.cs "Complete" method like this:

        internal static bool Complete(Tween t, bool modifyActiveLists = true)
        {
            if (t.loops == -1) return false;
            if (!t.isComplete) {
                //////////////////////////////////////////////////////////////////////////////
                // FIX: PI: Fixed situation when nested sequences doesn't tweens till end
                if (t.tweenType == TweenType.Sequence)
                {
                    Sequence s = (Sequence)t;
                    int len = s.sequencedTweens.Count;
                    for (int i = 0; i < len; ++i)
                        Complete(s.sequencedTweens[i], modifyActiveLists);
                }
                //////////////////////////////////////////////////////////////////////////////

                Tween.DoGoto(t, t.duration, t.loops, UpdateMode.Goto);
                t.isPlaying = false;
                // Despawn if needed
                if (t.autoKill) {
                    if (isUpdateLoop) t.active = false; // Just mark it for killing, so the update loop will take care of it
                    else Despawn(t, modifyActiveLists);
                }
                return true;
            }
            return false;
        }

Can you please check this approach or provide better solution for this issue?

Project with DOTween Pro corrupts Canvas Text

Hello,

I just purchase DOTween Pro, and immediately there is a problem. I created a simple Menu on a Canvas with Text and Buttons. The Text elements in the Editor becomes invisible or get corrupted when the Editor is switched behind another program like Mono Develop. This happens only while in the Editor. When I play the scene the Menu shows just fine. I made a separate project with just a single Menu, and the Menu display without corruption. Then I import DOTween Pro and perform the setup, and immediately the corruption can be observed.

I am running on a iMac with OSX 10.11.2, with DOTween Pro 0.9.470 (and v1.1.135).

Original Editor Screen Shown below:

image

and here with invisible Text elements:
image

This also happens with a single Text element on the Canvas.

The is a serious problem which effectively prohibits the use of DOTween in my project. Any help is appreciated.

Regards,
Markus

Disabled DOTweenAnimation affects enabled one

Hey, I've noticed such issue:

When I have 2 DOTweenAnimations on the same object, the TO \ FROM switch from one animation may affect another instance.
E.g. when I have such setup:
http://i.imgur.com/Ot5VU9c.png
First animation doesn't do anything when I start the scene, but it should move object from 0.1 to 0 on Y axis.

But when I change FROM to the TO at the second animation, first one starts to work as expected.

Tool to convert Animation and Path components to script

The Animation and Path components are awesome, but (as would be expected) don't provide the full functionality of scripting a sequence. It would be AWESOME if there was a "convert to script" button that simply made a text file of the sequence for the animation/path. That way we could set up the path very quickly in the editor and then tweak it in script.

Thank you for your work on this. It has been one of the best & most time saving plugins I've bought!

Need more path movement support.

I am porting my tween to dotween from iTween.But I find a serious limitaton.
We need move by path like in iTween.
Now the DoPath always return to the origin position. It is useless in many cases.

So in DotTween, I don't find any way to do path movement.
I think it is a serious limitation for a tween lib.
Please correct me if i am wrong.

Thank you.

Target mode doesn't work with 2D items

Hi,
I'm starting to use the new feature you added on monday, and I think there's a problem with UI objects. With 3D objects it works great, but when using an object attached to a RectTransform as target, the tween doesn't move to the wanted position.
Thanks

DOAlpha -> CanvasGroup

It would be nice if a DOAlpha shortcut is added to the CanvasGroup UI component (Unity 4.6+).

EDIT:
My bad, DOFade is the function I mentioned, which is already implemented ๐Ÿ‘!

Cannot play tween backwards

If you create a Tween and then try to play it backwards it doesn't work

DOTween.defaultAutoKill = false;
_openLevelPanel = levelPanel.transform.DOLocalRotate(new Vector3(0, 180, 0), 1).From().Pause();
_openLevelPanel.Complete(); // This works sending the tween to the end instantly
_openLevelPanel.PlayBackwards(); // This doesn't works

DOTween v.1.0.770
Unity v 5.0.0f4

Appending / Inserting a Sequence to another paused Sequence prevents future modifications

What steps will reproduce the problem?

Sequence rootSequence = DOTween.Sequence();
rootSequence.Pause();

Sequence Seq = DOTween.Sequence();
rootSequence.Append (Seq);

Seq.InsertCallback(1, delegate { Debug.Log ("My test callback!"); });

rootSequence.OnComplete(delegate {
    Debug.Log ("Sequence is complete");
});

rootSequence.Play();

The callback is never called, neither the OnComplete delegate.

What is the expected output? What do you see instead?
As rootSequence is paused (and therefore Seq), I should be able to Append/Insert new elements to both sequences, but it is not the case and nothing happens.

What version of the product are you using?
DOTween v1.0.800

Workaround
Add Seq to rootSequence just before playing it.

Sequence rootSequence = DOTween.Sequence();
rootSequence.Pause();

rootSequence.OnComplete(delegate {
    Debug.Log ("Sequence is complete");
});

Sequence Seq = DOTween.Sequence();
Seq.InsertCallback(1, delegate { Debug.Log ("My test callback!"); });
rootSequence.Append (Seq);

rootSequence.Play();

Sequence inserts and joins should not overlap delays

Hi,

DOTween documentation clearly says that:

Delays and loops (when not infinite) will work even inside nested tweens.

And although it seems to work for Appended and Prepended tweens, Inserts and Joins seems to overwrite delays back to "0", or in other words, starting at atPosition and last tween's position, respectively.

My point is:
It may sound logical to someone that delays should count even with Inserts and Joins, so they should start counting from atPosition and last tween's position.

What do you think about it?

Speedbased Sequence

Hello,

I am using DOTween v1.0.470.

I tried to setup a speed based sequence as followed.
Sequence rotationSequenz = DOTween.Sequence();
rotationSequenz.Append(TestToolbox.Instance.PositionMarker.transform.DOLocalRotate(new Vector3(0, 0, angle), 0.5f, RotateMode.LocalAxisAdd).SetSpeedBased(true));
rotationSequenz.Append(TestToolbox.Instance.PositionMarker.transform.DOLocalRotate(new Vector3(-angleX, 0, 0), 0.5f, RotateMode.LocalAxisAdd).SetSpeedBased(true));
rotationSequenz.SetSpeedBased(true);

But it still uses the duration based tweening.
Did i something wrong or is speedbased nog supporfed for sequences?

Thanks for your help
Michael.

Tween rates speed up each time Unity recompiles/reloads scripts.

I have a simple tween that interpolates a value from 0.0f to 1.0f over one second. Running at 90hz this takes 90 frames of updates on the first run. Each time I modify script and let Unity recompile and reload without restarting the game, the tween time reduces by half (90, 45, 23, etc).

I suspect something is updating twice internally in the DOTween engine, but haven't looked at checking out the code and stepping through it yet.

I tried calling DOTween.Clear(true), DOTween.Init() on script reload, and various combinations of settings to no effect. The tween behaviour otherwise seems correct, just running at incorrect rate. The tween easing type seems to have no effect on this update rate.

var tween_time = 1.0f;
var time_value = 0.0f;
var tween = DOTween.To(() => time_value, (x) => time_value = x, 1.0f, tween_time);
var counter = 0;

yield return tween.WaitForStart();
while (!tween.IsComplete() && tween.IsActive())
{
log(counter++);
yield return null;
}

// counter should be half each script reload iteration

Bug in Mono breaks some minor stuff in DOTween

Extension methods with optional parameters fails to compile in Mono:

in example (from examples):

t.DORotate(new Vector3(0, 135, 0), 1);

says: "No overload of DORotate method accept 2 parameters". People like me having window Vista can't install VS 2013 (wich would be otherwise my choice). The only workaround seems specializing the overload.

It could possibly be related with localized version of Mono if you can't reproduce the issue (actually the real error message is: "Nessun overload del metodo DORotate accetta 2 argomenti")

Mono Version:
4.0.1

Unity Version:
5.1.2f1

.ween version:
1.0.810

Thanks for keeping DOTween free, that's a really cool framework ;) (I wanted to remove broken code but apparently I'm unable to compile DOTween with Mono)

AppendCallback execution order in a Sequence.

What steps will reproduce the problem?

int number = 0;
Sequence s = DOTween.Sequence();
s.Append(DOTween.To(() => number, i => number = i, 1, 0.1f));
s.AppendCallback(() => { Debug.Log("1. Callback, number is set to 100"); number = 100; });
s.Append(DOTween.To(() => { Debug.Log("2. Getter: " + number); return number; },
    i => { Debug.Log("3. Setter: " + i); number = i; }, 50, 0.1f));

What is the expected output? What do you see instead?

Expected:

  1. Callback, number is set to 100
  2. Getter: 100
  3. Setter: 68
  4. Setter: 51
  5. Setter: 50

Actual result:
2. Getter: 1
3. Setter: 32

  1. Callback, number is set to 100
  2. Setter: 46
  3. Setter: 49
  4. Setter: 50

What version of the product are you using?
DOTween v1.0.770 [Release build]

Workaround is to use OnComplete:

int number = 0;
Sequence s = DOTween.Sequence();
s.Append(DOTween.To(() => number, i => number = i, 1, 0.1f)
    .OnComplete(() => { Debug.Log("1. OnComplete, number is set to 100"); number = 100; }));
s.Append(DOTween.To(() => { Debug.Log("2. Getter: " + number); return number; }, i => { Debug.Log("3. Setter: " + i); number = i; }, 50, 0.1f));

Add support for RepeatDelay

Hey,
Loving DOTween and finding it very useful. However, one feature is sorely missing in my opinion - the ability to set a delay between repeats without having to use a sequence (with AddInterval).
I suggest either adding it as a parameter to SetLoops(loopAmount, LoopType, repeatDelay) or a separate SetRepeatDelay chained method.

Thanks!

DOKill not available for Materials

I am currently killing tweens for material.DOColor() with DOTween.Kill(material). Is it intentional for not including DOKill() for materials?

Apple 64-bit support requirement

Hi all,

I am working on a game which I use DGTweening plug-in for my animations.
I am currently trying to submit it for apple test flight so I can share with my beta testers, but I am not able to do so as Apple keeps showing me the "missing 64-bit support" message.
I think I did everything else I could find in tutorials and forums so I have a question:
Has anybody deployed to apple a game developed using DGTweening?
Just would like to make sure it supports 64-bits as well.

My plug-in version: v1.0.800.

Thanks in advance,
Thiagus

OnComplete() is not called for tween inside Sequence.

What steps will reproduce the problem?

int dummy = 0;
float duration1 = 0.001f;
float duration2 = 0.0010001f;
bool isTweenCompleted = false;
Sequence itemSequence = DOTween.Sequence()
    .AppendInterval(duration1)
    .Append(DOTween.To(() => 0, i => dummy = i, 20, duration2)
        .OnComplete(() =>
        {
            Debug.Log("OnComplete tween");
            isTweenCompleted = true;
        }))
    .OnComplete(() => { Debug.Log("OnComplete sequence, " + (isTweenCompleted ? "ok" : "BUG")); });

What is the expected output? What do you see instead?

Expected:
OnComplete tween
OnComplete sequence, ok

Actual result:
OnComplete sequence, BUG

What version of the product are you using?
DOTween v1.0.770 [Release build]

Bug occurs for some values of duration2.

some extra callback needs

Hi, can you add some callbacks as below:
Tweener.OnPlayForwardStart() called at the beginning of the PlayForward method.
Tweener.OnPlayForwardComplete() called when the PlayForward method is done.
Tweener.OnPlayBackwardsStart() called at the beginning of the PlayBackwards method.
Tweener.OnPlayBackwardsComplete() called when the PlayBackwards method is done.

thanks!

Allow Shake/Punch generic methods to work with floats

Original from jedhubic on Google Code (Issue 33):

Hey there, been loving DOTween and was an instant donator after my first use. I was wondering if it's possible to add tweening on the generic methods to apply to floats as well? Right now the getters/setters require Vector3s, which, are easy enough to work with on variables I've created, however some scripts and stuff that I'm using would benefit greatly if I were able to apply tweening like punch or shake on a float value (camera distortion is one example). Hope that makes sense??? Thanks!

Control the duration between each DOPath waypoint

Would you please add the new feature to DOTween to control the duration between every two points of the DOPath.
Transform.DOPath(Vector3[] points, float[] durations, float[] waitTimes,...);
points array contains the points of the path.
durations[i] is the time will take to reach points[i].
waitTimes[i] is the time the animation will pause at the points[i].

my english is poor, wish you could understand what i am saying.

best regards!

exception stack trace is swallowed when using safemode

Hi,

When using useSafeMode=True, if an exception occurs within a callback (e.g. inside an OnComplete callback), the exception stack trace is swallowed, and only the exception message is printed to the log. This make debugging significantly harder.

DoTweenPro v0.9.160
Unity v5.0.1f1

Thanks!

DOTween instances for different modules

Hi!
It would be great, if it were possible to initialize instance of DOTween in a separate module. For example the different modules of the system operate with DOTween, and each needs its own configuration, capacity etc without intersections.
Thanks!

Callback called twice

Hi! For some tweens callback called twice. I noticed that in this case depends on the ease for sequence (OutBounce).

DOTween v1.0.665 release
Unity 4.6.4 p4

public class Test : MonoBehaviour
{
    public Transform ObjTransform1;
    public Transform ObjTransform2;

    private readonly string Id = "test";
    private readonly Ease Ease = Ease.OutBounce;
    private readonly float Duration = 1f;
    private readonly float StartDelay = 0f;
    private readonly float Delay = 0.25f;

    void Start()
    {
        Sequence tweenSequence = DOTween.Sequence();
        tweenSequence.SetId(Id);
        tweenSequence.SetEase(Ease);
        tweenSequence.OnStart(() => Debug.Log("Started"));
        tweenSequence.OnComplete(() => Debug.Log("Completed"));

        Tween firstMoveTween = ObjTransform1.DOLocalMove(ObjTransform2.localPosition, Duration);
        firstMoveTween.OnStart(() => Debug.Log("Transform started " + ObjTransform1.name));
        firstMoveTween.OnComplete(() => Debug.Log("Transform completed " + ObjTransform1.name));

        Tween secondMoveTween = ObjTransform2.DOLocalMove(ObjTransform1.localPosition, Duration);
        secondMoveTween.OnStart(() => Debug.Log("Transform started " + ObjTransform2.name));
        secondMoveTween.OnComplete(() => Debug.Log("Transform completed " + ObjTransform2.name));

        tweenSequence.Insert(StartDelay, firstMoveTween);
        tweenSequence.Insert(StartDelay + Delay, secondMoveTween);
    }
}

Log (cube1 completed called twice):

test

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.