Skip to content

ComradeVanti/UnityWaitForAnim

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

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