Search Unity

animation control from just script

Discussion in 'Scripting' started by shader, Apr 7, 2016.

  1. shader

    shader

    Joined:
    Apr 4, 2009
    Posts:
    253
    Hi
    I haven't used Unity for nearly three years and I have missed out on a few of the new developments.

    Previously, I used a simple script ( animation.play() etc) to switch an imported fan model's baked animation states such as off/off/slow/fast etc. I would like to repeat this now using the newer method of scripting. I also wanted to avoid using Mecamin ie keeping it limited to animation clips.

    (I have successfully used Mecamin to open and control doors but I wanted to re-create what was previously very simple and straightforward)

    Thank you for any help
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    legacy animation is still supported...
     
  3. shader

    shader

    Joined:
    Apr 4, 2009
    Posts:
    253
    Thanks for replying but is there a 'new' way to achieve it in code ?