Search Unity

Animation not playing via code

Discussion in 'Animation' started by Deleted, Feb 6, 2014.

  1. Deleted

    Deleted

    Joined:
    Dec 8, 2012
    Posts:
    16
    The animation plays correctly when I play it manually from the editor, but it won't work via code.
    this is my setup:
    $Cattura.PNG

    I've also tried using animation.Play function. Note that no excepcions are launched.
     
  2. Deleted

    Deleted

    Joined:
    Dec 8, 2012
    Posts:
    16
    I managed to make it work. I was following a tutorial, but when I switched the code above to use:

    it did the trick.