Search Unity

How to add animations to a gameobject?

Discussion in 'Animation' started by j_perker, Mar 8, 2014.

  1. j_perker

    j_perker

    Joined:
    Feb 20, 2014
    Posts:
    19
    just needed to add a sprite renderer and it worked.
    ***************************************************************************************************************************************

    So I have the animations working if the game object is in the scene, but if I instantiate it it doesn't seem to be adding the animations..
    I'm actually instantiating a different prefab from the one originally in the scene so I had to re-add the animator and animation component.. What do I need to drag onto the prefab for it to get all the animations and logic behind the animations? I tried dragging the controller after adding an animator component but that didn't work :/ Any idea?

    Example:

    1vNPC mode the player is already in the scene and the animations work fine

    1v1 Online mode I have seperate network player (basically the same as player but configured for network play) and when the player gets instantiated the animations don't work and it's invisible. The animations are exactly the same as the ones I used for the 1vNPC mode but I can't figure out the right way to add them to the network player.
     
    Last edited: Mar 8, 2014