Disable warnEndValueEqualsCurrent on a per tween/sequence basis #48
-
Hey, recently started to use PrimeTween and really like it. Is there a way to disable warnEndValueEqualsCurrent on a per tween basis? Disabling the warning just while setting up these tweens doesn't work as you probably do the check at a later point in time. I could check if I need a fade at all, but it's sequences of fades, the code is much cleaner without this extra checks and I'd love to not disable the warning globally. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey, Unfortunately, enabling the public Sequence Animate() {
var sequence = Sequence.Create();
if (image.color.a != targetAlpha) {
sequence.Group(Tween.Alpha(image, targetAlpha, duration));
}
return sequence;
} Yes, disabling the One thing I have on my mind to address this issue is to save the |
Beta Was this translation helpful? Give feedback.
-
@Nelvin I implemented this feature request in version 1.1.12. Now it's possible to disable the |
Beta Was this translation helpful? Give feedback.
Hey,
Unfortunately, enabling the
warnEndValueEqualsCurrent
setting is impossible on a per-tween basis. I understand that checking the current value is not a perfect solution, but I'm afraid this is the only option for now:Yes, disabling the
warnEndValueEqualsCurrent
settings just before creating a tween and enabling the setting right after that will not work because PrimeTween doesn't start animation immediately, but waits for LateUpdate() (or for the startDelay as in your case).One thing…