Skip to content

A custom yield-instruction for Unity to wait for animations to finish

License

Unlicense, Unknown licenses found

Licenses found

Unlicense
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

ComradeVanti/UnityWaitForAnim

Repository files navigation

WaitForAnim

openupm

A Unity-package for waiting for animations in coroutines.

Check out the wiki here.

Found any issues? Leave them here.

Want to see what's new? The changelog is here.

⚠️ Development is paused ⚠️
No new features will be added or bugs fixed unless requested through an issue.
If you wish to fork this repository and continue the work, you are very welcome to do so.

Features

Start an animation and wait for it to finish

If you want to wait for an animation to stop playing, you can use WaitForAnimationToFinish.

yield return new WaitForAnimationToFinish(animator, "MyAnim");

You can also start an animation and wait for it to finish using the extension method PlayAndWait.

yield return animator.PlayAndWait("MyAnim");

Wait for an animation to start

If you want to wait for an animation to start playing, you can use WaitForAnimationToStart.

yield return new WaitForAnimationToStart(animator, "Test");

Installation

The quickest way is to install via OpenUPM using openupm add dev.comradevanti.wait-for-anim.

Or install manually as git dependency from https://github.com/ComradeVanti/UnityWaitForAnim.git or download as zip and import locally.

Compatability

Developed with Unity 2020.3 but good chance that it will work with earlier versions, though this has not been tested.

About

A custom yield-instruction for Unity to wait for animations to finish

Topics

Resources

License

Unlicense, Unknown licenses found

Licenses found

Unlicense
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Languages