Comments (6)
any progress/workaround/suggestions?
from dotween.
Sequences made entirely of callbacks also execute in wrong order.
What steps will reproduce the problem?
Sequence seq = DOTween.Sequence();
seq.SetAutoKill(false);
seq.AppendCallback(delegate { Debug.Log("1"); });
seq.AppendCallback(delegate { Debug.Log("2"); });
seq.AppendCallback(delegate { Debug.Log("3"); });
seq.AppendCallback(delegate { Debug.Log("4"); });
seq.AppendCallback(delegate { Debug.Log("5"); });
What is the expected output? What do you see instead?
Expected:
1
2
3
4
5
Actual result:
4
5
3
1
2
What version of the product are you using?
DOTween v1.1.340 [Compatibility build]
The sequence runs if played with PlayForward
, however it does not when the sequence is completed and PlayBackwards
is called.
This issue prevents me from using sequences made only of callbacks as the documentation states. And it would also be useful to be able to execute them backwards.
from dotween.
Hi,
Time is truly important (this is a tween engine after all :P), so things/callbacks that happen at the same exact time are fired randomly, because the only order is time.
If you want something to be called after something else, just add a slight timegap between the two (even if only 0.0001), so you can play it backwards.
If you want things to happen at the same time but with your desired order, use a single callback:
seq.AppendCallback(()=>{
Debug.Log("1");
Debug.Log("2");
Debug.Log("3");
});
from dotween.
Hello @Demigiant !
I am using DoTween 1.2.632 and I have noticed that code such as
Sequence seq = DOTween.Sequence();
seq.SetAutoKill(false);
seq.AppendCallback(delegate { Debug.Log("1"); });
seq.AppendCallback(delegate { Debug.Log("2"); });
seq.AppendCallback(delegate { Debug.Log("3"); });
seq.AppendCallback(delegate { Debug.Log("4"); });
seq.AppendCallback(delegate { Debug.Log("5"); });
now produces always the same output: 1 2 3 4 5 (at least in the Editor) reliably. Did something change in the implementation since 2016?
Also, it is not clear to me what Adds the given callback to the end of the Sequence. means in the docs for the AppendCallack method because it seems that the code in the AppendCallack gets triggered in the sequence order, not at the end of the sequence. Could you please clarify?
Thanks for your help!
from dotween.
Hey!
Yes, I upgraded the system so that even callbacks are now called in the order you added them, even if they're at the same time position :) And about AppendCallback, I just added a clarification to the docs: "Adds the given callback to the end of the Sequence (meaning the current total duration of the Sequence)". Does that sound good?
from dotween.
@Demigiant
Your comment and the new phrasing in the docs solve every doubt I had.
Thank you for your update and your incredible library. Cheers!
from dotween.
Related Issues (20)
- Any chance of a version of DOTween that can run on .NET without Unity?
- Can the owners please make a release as per the version on Unity Asset store HOT 2
- OnKill is called late when calling Kill from tween callback HOT 1
- Managing Dynamic WayPoint Updates in DOPath
- How DOTween.ManualUpdate works?
- Build for Android failed - Error: IL2CPP error for type 'DG.Tweening.Tween' in assembly
- OnComplete problem (again of course) with singleton classes
- How to make OnUpdate and ChangeEndValue work properly?
- Index out of range error
- Startup errors not giving detailed warnings when default logging enabled
- DOComplete -> TweenManager.FilteredOperation: IndexOutOfRangeException (Possibly related to SetTweensCapacity?)
- [Feature Request] Assembly Definition & Version Define Resource HOT 1
- The DOTweenPath won't rotate or move with the parent
- WaitForCompletion stuck on recycled tween
- Can Dojump use endvalues ββthat change in real time?
- DoPath - Change waypoints during tween is running
- Combining Eases HOT 1
- UI Tweening works unreliably HOT 7
- NaN Input Error HOT 2
- Upgrading to Unity 6 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotween.