Skip to content

Animation Component

mika edited this page Apr 26, 2018 · 3 revisions

Animation Component

  • void StopAnimation(string target)
  • void PlayAnimation(string target)
    • Stops or Plays Animation component for all Animation components founded in children of target gameobject
  • float GetAnimationLength(string target)
    • returns length of first animation component
    • if no animation component is founded, returns -1
  • float GetAnimationTime(string target)
    • current play position
  • float GetAnimationTimeNormalized(string target)
    • same as above, but using normalized time 0-1
  • bool JumpToAnimationTime(string target, float time, bool stopPlaying = false)
    • jumps to animation time, in the first animation component
    • if no animation component is founded, returns false
  • bool JumpToAnimationTimeNormalized(string target, float time, bool stopPlaying = false)
    • same as above, but using normalized time 0-1
  • bool SetAnimationSpeed(string target, float speed)
    • sets animation speed in the first animation component
    • if no animation component is founded, returns false
Clone this wiki locally