You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @dentedpixel 👋
First of all, I really like your LeanTween project and appreciate your hard work and what you've achieved!! 😀
I noticed some unexpected LeanTween behavior in one of my other projects and tried to reproduce it in a separate project.
You can also find the code in the repo, to run it yourself if you want.
Setup
3 rows of objects, each row is an instance of a prefab
a row consists of:
an UI Image, whose alpha value is changed by LeanTween using LeanTween.alpha(image.rectTransform, 0.3f, 0.5f).setLoopPingPong()
an ON button, which triggers the effect LeanTween.resume(tweenId)
an OFF button, which pauses the effect LeanTween.pause(tweenId)
a text field, which shows the current isPaused value LeanTween.isPaused(tweenId)
a text field, which shows the current isTweening value LeanTween.isTweening(tweenId)
each row has its own unique tweenId (shown above the image), derived from tweenId = LeanTween.alpha(image.rectTransform, 0.3f, 0.5f).setLoopPingPong().id
Current Behavior
isTweening is ALWAYS true, even when the tween is paused (is this expected behavior?)
I expected that isTweening is the opposite/negation of isPaused
The docu says:
Test whether or not a tween is active on a GameObject
And I thought when a tween is paused it's not active, so it would be false.
when the first row is resumed or paused, then it also changes the value of all the other rows (even though they have different ids, so LeanTween.isPaused(tweenId) should be unique for the first row and shouldn't affect the other rows
when the other rows are resumed or paused, then it does not change the result of the isPaused method
public static bool isPaused(RectTransform rect)
{
return isTweening(rect.gameObject);
}
Expected Behavior
Pausing a tween should not affect the result of isPaused for other tweens with different ids.
isTweening returns true, while it's tweening (when active) or false when not (e.g. when paused). But perhaps that's a wrong expectation or understanding on my side.
The text was updated successfully, but these errors were encountered:
Hi @basisbit
Thanks for your response. That's very unfortunate. 😕
I noticed as well that @dentedpixel isn't active on this project anymore, but I had the hope that there might be another contributor in this project who might have taken this project over. 🤷♂️
Anyway... Have a great day.
Hi @dentedpixel 👋
First of all, I really like your LeanTween project and appreciate your hard work and what you've achieved!! 😀
I noticed some unexpected LeanTween behavior in one of my other projects and tried to reproduce it in a separate project.
You can also find the code in the repo, to run it yourself if you want.
Setup
LeanTween.alpha(image.rectTransform, 0.3f, 0.5f).setLoopPingPong()
LeanTween.resume(tweenId)
LeanTween.pause(tweenId)
isPaused
valueLeanTween.isPaused(tweenId)
isTweening
valueLeanTween.isTweening(tweenId)
tweenId = LeanTween.alpha(image.rectTransform, 0.3f, 0.5f).setLoopPingPong().id
Current Behavior
isTweening
is ALWAYS true, even when the tween is paused (is this expected behavior?)isTweening
is the opposite/negation ofisPaused
And I thought when a tween is paused it's not active, so it would be false.
when the first row is resumed or paused, then it also changes the value of all the other rows (even though they have different ids, so
LeanTween.isPaused(tweenId)
should be unique for the first row and shouldn't affect the other rowswhen the other rows are resumed or paused, then it does not change the result of the
isPaused
methodI checked the LeanTween isPaused() implementation and noticed that
isPaused
returns the result ofisTweening
, is this intended? btw I found an already existing issue regarding that isPaused copy-paste error #160Expected Behavior
isPaused
for other tweens with different ids.isTweening
returns true, while it's tweening (when active) or false when not (e.g. when paused). But perhaps that's a wrong expectation or understanding on my side.The text was updated successfully, but these errors were encountered: