Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Simple Low-Level control over Animation Playback (via script)

Discussion in 'Animation' started by wiredninja, Jul 16, 2021.

  1. wiredninja

    wiredninja

    Joined:
    Jul 5, 2021
    Posts:
    15
    I'm a programmer working on my first Unity Project. I'm seeking to do the following via script:

    - select what animation to play (at any time / controlling the state machine)
    - control playback of animation (play / stop / rewind)


    What would be the most direct way to access this (as I see it) basic functionality / level of control over animations in Unity?

    PS: I'm working on a simple 2D Graphics Adventure.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,491
    Check out Animancer (link in my signature). It's probably exactly what you're looking for.
     
  3. wiredninja

    wiredninja

    Joined:
    Jul 5, 2021
    Posts:
    15
    Hello Kybernetik,
    I've seen your Asset during my initial research on this topic - and I agree that it would solve my issue. However, since I'm learning Unity I need to figure out what can be done with unitys "native capabilities" before I use third party solutions.

    If anyone is interested, I solved my Problem by using Animation Events to control animation playback to a somewhat satisfying degree while using the state machine as intended via AnimationController / Animation-Window. Not what I hoped for, but what can you do... aside from using Animancer.

    On a personal note, this restrictive animation system feels like bad design to me - at least from a coders perspective, as I see how working with animation-designers can benefit from it.