Search Unity

New UI Button On Click(), how to play animation?

Discussion in 'Editor & General Support' started by Mateq, Oct 21, 2014.

  1. Mateq

    Mateq

    Joined:
    Jul 15, 2013
    Posts:
    4
    I have a little problem playing animations after pressing given button using the new UI system.
    I have my animation created that I want to play after pressing the key but I just cant get it working.
    After creating animation, I got animator (component) on my desired object, I also added animation (component).

    I tried using script too, with no success.

    Errors I get:
    -The AnimationClip 'slideout' used by the Animation component 'GameObject' must be marked as Legacy.

    After changing to legacy(in debug mode from 2 to 1)
    -Animation clip 'slideout' is not retargetable. Animation clips used within the Animator Controller need to have Muscle Definition set up in the Asset Importer Inspector

    Any ideas?