Show / Hide Table of Contents

Class AnimationUtilities

Misc utility functions for animation related tasks

Inheritance
object
AnimationUtilities
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public static class AnimationUtilities

Methods

| Edit this page View Source

GetCurrentAnimationTime(Animator)

Gets the duration of the currently playing animation state

Declaration
public static float GetCurrentAnimationTime(this Animator animator)
Parameters
Type Name Description
Animator animator

The animator to check under

Returns
Type Description
float

Returns the duration of the currently playing animation state

| Edit this page View Source

PlayAnimation(Animator, string)

Plays an animation state

Declaration
public static void PlayAnimation(this Animator animator, string animationStateName)
Parameters
Type Name Description
Animator animator

The animator to play the state on

string animationStateName

The state to play

| Edit this page View Source

PlayAnimationTillDone(Animator, string)

Plays an animation state and waits until it is finished

Declaration
public static IEnumerator PlayAnimationTillDone(this Animator animator, string animationStateName)
Parameters
Type Name Description
Animator animator

The animator to play the state on

string animationStateName

The state to play

Returns
Type Description
IEnumerator
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾