Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V5]The UIEffect Reverse property does not work #283

Closed
xfvvvv opened this issue Dec 8, 2024 · 8 comments
Closed

[V5]The UIEffect Reverse property does not work #283

xfvvvv opened this issue Dec 8, 2024 · 8 comments
Assignees

Comments

@xfvvvv
Copy link

xfvvvv commented Dec 8, 2024

Hello,

The Reverse property does not work in UIEffect. It is not possible to play the effect in reverse. For example, when using the Dissolve effect, you can only play it in the forward direction.

Thank you!

@mob-sakai
Copy link
Owner

Thank you for your reporting!

@mob-sakai mob-sakai added bug and removed question labels Dec 9, 2024
mob-sakai added a commit that referenced this issue Dec 11, 2024
mob-sakai added a commit that referenced this issue Dec 13, 2024
mob-sakai added a commit that referenced this issue Dec 14, 2024
@mob-sakai
Copy link
Owner

It is scheduled to be released in version 5.1.0! 👍

@alexxtaurus83
Copy link

Any updates? still not working. Tried to check develop-exp - not working too.
Tring to play Dissolve effect,

var tweener = gameObject.AddComponent();
tweener.wrapMode = UIEffectTweener.WrapMode.Once;
tweener.duration = 5f;
tweener.playOnEnable = PlayOnEnable.Reverse;
tweener.direction = Direction.Reverse;
tweener.PlayReverse();

@mob-sakai
Copy link
Owner

There are two approaches to implement the intended behavior:

Use UIEffectTweener.SetTime

var tweener = gameObject.AddComponent<UIEffectTweener>();
tweener.wrapMode = UIEffectTweener.WrapMode.Once;
tweener.duration = 5f;
tweener.playOnEnable = PlayOnEnable.Reverse;
tweener.direction = Direction.Reverse;
tweener.SetTime(5); // Added
tweener.PlayReverse();

Use UIEffectTweener.curve

var tweener = gameObject.AddComponent<UIEffectTweener>();
tweener.wrapMode = UIEffectTweener.WrapMode.Once;
tweener.duration = 5f;
tweener.curve = AnimationCurve.Linear(0,1,1,0); // Added
tweener.PlayForward();

@alexxtaurus83
Copy link

Worked this way:
var tweener = wikiItemPresenter.gameObject.AddComponent();
tweener.wrapMode = UIEffectTweener.WrapMode.Once;
tweener.duration = effectDuration;
tweener.curve = AnimationCurve.Linear(0, 1, 1, 0); // Added
tweener.PlayForward();

Can I use stable version 5.0.2 to avoid develop-exp?

@mob-sakai
Copy link
Owner

👍

Can I use stable version 5.0.2 to avoid develop-exp?

Hmm, I can't guarantee that code will work with UIEffect v5.0.2, but feel free to try it.
By the way, develop-exp is expected to be released as 5.1.0 soon.

@alexxtaurus83
Copy link

Thank you for your work!

github-actions bot pushed a commit that referenced this issue Dec 31, 2024
# [5.1.0](5.0.2...5.1.0) (2024-12-31)

### Bug Fixes

* changing the `shadowMirrorScale` property via code does not update the effect ([d9bf0e1](d9bf0e1))
* fix reverse direction mode for UIEffectTweener ([54825ee](54825ee)), closes [#281](#281) [#282](#282) [#283](#283)

### Features

* add `Color Glow`, `Transition Color Glow` and `Shadow Color Glow` options ([e9522d3](e9522d3))
* add `GradationMode.Angle` and `GradationMode.AngleGradient` ([08e9ba7](08e9ba7))
* add `OnComplete` event for UIEffectTweener ([aeb78ed](aeb78ed)), closes [#289](#289) [#188](#188)
* add `PlayOnEnable` option for UIEffectTweener ([1558736](1558736))
* add `SamplingScale` option ([2b43bc4](2b43bc4)), closes [#269](#269)
* add `Shadow Color` and `Shadow Blur` options ([d0a3ca6](d0a3ca6))
* add a button to swap gradation colors (editor) ([20a6ca0](20a6ca0))
* add option to not automatically plays tweener effect ([88609f5](88609f5))
* automatically display a dialog to import TextMeshPro support ([f2df188](f2df188))
* gradation feature ([bbe57df](bbe57df)), closes [#277](#277) [#66](#66)
* on-demand UIEffect shader support ([bdd8e08](bdd8e08)), closes [#212](#212) [#271](#271)
* support `TextMeshPro/Bitmap` and `TextMeshPro/Mobile/Bitmap` shaders. ([23ac398](23ac398)), closes [#284](#284)
* support non full-rect graphics for some effect ([a66baea](a66baea))
* UIEffectTweener animation preview in edit mode ([e17b4a0](e17b4a0)), closes [#279](#279)
@mob-sakai
Copy link
Owner

🎉 This issue has been resolved in version 5.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants