Comments (9)
Hi!
Woah weird! Ease is calculated in a completely independent way from the duration, so it shouldn't matter at all with callbacks. Could you try with this last version I uploaded (which fixes a bug with callbacks) and let me know if it still happens?
Cheers!
from dotween.
Hi!
You did not try to reproduce the example?
I updated version, but callback still called twice.
Repro project:
http://s000.tinyupload.com/?file_id=71881774889752584613
Thanks!
from dotween.
Ouch, I apologize! I was slammed after completing the new DOTween update yesterday, and I went over your issue too quickly.
Exclusively in the case of Sequences, ease does influence the time position and thus the internal callbacks too. This is not a bug though, because with Bounce (or Elastic) eases some Sequenced tween might actually complete twice. That's because, when the whole Sequence is bouncing, a nested tween might complete, then rewind back a little, then complete again (depending on the position where it was inserted).
from dotween.
I understand what you mean, but in practice it is strange and not intuitive. In practice, user does not expect it and waiting for a single OnComplete callback.
from dotween.
I'm thinking that I might disallow Bounce/Elastic ease with Sequences, which would prevent this confusion, but I would rather not. Uhmmm. By the way, you know you can apply easings to nested Tweens directly (in which case this issue wouldn't happen) right?
from dotween.
Now I am planning to move away from the use of sequences (I will use separate tweens with delays and durations), because the profiler shows certain amount of GC Alloc for sequences (with no callbacks).
Besides, I still think how get around closures (generates lot of GC Alloc for my custom data). For example 100 callback for start, 100 for complete with custom data as args. Maybe using of separate custom timers or timeline for triggers.
from dotween.
Ouch, Sequences generating GC Alloc is very shameful. Totally my bad, I introduced that recently while working around an issue concerning floating point imprecision. I am on it, and hope to remove those allocations asap.
I've thought about possible solutions in order to get around your closure problem, but can't find anything satisfying API-wise and KB-wise. Will ponder more, and if you think of something let me know.
from dotween.
P.S. opened a new issue about Sequences GC alloc here
from dotween.
UPDATE: this is an open issue just so people can read about it, but it's actually a NON issue. It's a matter of how the logic of easing applies to whole Sequences. Here's a summary:
Exclusively in the case of Sequences, ease does influence the time position and thus the internal callbacks too. This is not a bug though, because with Bounce (or Elastic) eases some Sequenced tween might actually complete twice. That's because, when the whole Sequence is bouncing, a nested tween might complete, then rewind back a little, then complete again (depending on the position where it was inserted).
from dotween.
Related Issues (20)
- 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'.
- SetDelay is appending interval between two tween Joined in sequence HOT 2
- DOTween adds 2.7MB to WebGL build HOT 1
- Is DOJump not supported for Kinematic 3D Rigidbodies?
- Unity using DOTween pro UI creates ghost effect HOT 5
- Does not support the latest 6 preview?
- Demo link is no longer operational
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.