UnityWaitForAnim Save

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

Project README

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.

Open Source Agenda is not affiliated with "UnityWaitForAnim" Project. README Source: ComradeVanti/UnityWaitForAnim
Stars
42
Open Issues
0
Last Commit
1 month ago

Open Source Agenda Badge

Open Source Agenda Rating