Search Unity

play multiple animations on one object

Discussion in 'Animation' started by davejones1, Mar 19, 2018.

  1. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    How do I play multiple animations on one Object? I am trying to set up a system where I have the ability to play multiple animations on one object depending on which button has been pressed. I have a set of UI buttons. When clicked, each button triggers an animation on the same object. The issue is I am not sure how to do this efficiently. So far I have just duplicated the object and added each animation to the duplicated object. There must be a better way.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Using mecanim - set up a state machine that includes all the animations. Then create the condition for each animation to play. If you don't need transitions and 'character' type features - consider the legacy system.
    Check the animation learn section for direction on mecanim and legacy animation systems.
     
  3. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    Ok, thanks for the reply. I will have a look at the animation learn section.
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    This also exists - but I've not used it before - might be something else to look into.
     
    davejones1 likes this.
  5. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    I've got the hang of using mecanim but I can always refer to this as a backup.
     
    theANMATOR2b likes this.