Search Unity

Creating animation entirely by script

Discussion in 'Animation' started by brocoio123, Sep 25, 2017.

  1. brocoio123

    brocoio123

    Joined:
    Dec 21, 2013
    Posts:
    2
    Hello, i'm new to unity and just started to familiarize myself with the animator, but can i create a fully working animation + animation controller files without actually using the animator, instead using a script?

    I'm want to use this for automation purposes.
     
  2. Sluggy

    Sluggy

    Joined:
    Nov 27, 2012
    Posts:
    985
    Yes, but with a couple caveats - 1) Only in the editor and 2) It's a real nightmare.
    I used a custom editor to automate the process of importing sprites, slicing them, animating them, and creating controllers for them so that I could create and edit swaths of 2D characters in a single button click. Probably took me three weeks to develop and another three months to squash the biggest of the bugs - and it's a real mess. The API is just terrible.