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

How to fire event after animation ends? #289

Closed
alexxtaurus83 opened this issue Dec 29, 2024 · 2 comments
Closed

How to fire event after animation ends? #289

alexxtaurus83 opened this issue Dec 29, 2024 · 2 comments
Assignees

Comments

@alexxtaurus83
Copy link

A description of the question.

I need to add event after animation ends after PlayForward() call.
How to do this?

var tweener = wikiItemPresenter.gameObject.AddComponent();
tweener.wrapMode = UIEffectTweener.WrapMode.Once;
tweener.duration = effectDuration;
tweener.curve = AnimationCurve.Linear(0, 1, 1, 0);
tweener.PlayForward();

@mob-sakai
Copy link
Owner

Indeed, that is a common use case.
I will add an OnComplete event later.

As a workaround, you can monitor isTweening in a coroutine.

mob-sakai added a commit that referenced this issue Dec 29, 2024
mob-sakai added a commit that referenced this issue Dec 30, 2024
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

2 participants