Search Unity

Animator bugs out in PUN project

Discussion in 'Animation' started by jaja1, Aug 8, 2014.

  1. jaja1

    jaja1

    Joined:
    Aug 7, 2014
    Posts:
    6
    For the past few hours I've been banging my head on the wall over this.
    I have two projects in unity with two identical characters (1 character per project). The characters are sprites in a 3D project (strange I know but I don't think that matters). Both characters are identical (script/component wise) and have animator components. They are not prefabs but once I get the issue sorted out I plan on converting one of the characters into a prefab. One of the characters works perfectly with a character controller I made in java. The other character has the same script but in c#. For some reason the second character does not animate properly using the state machine. I try to move in game and the walking and idle animations play randomly no matter what direction and the state machine doesn't show when the animations are playing. YES: the live update button is selected, YES: the gameobject is selected, YES: the animations worked PERFECTLY in the first project using the SAME sprites AND state machine configurations and parameters. The only difference is in the second project I have set up PUN. I disabled all PUN scripts in the character but no use. Can someone please tell me what's going on? I will provide any extra details upon request. I made this post on a phone because I wasn't at my PC at the time. Thanks in advance.

    [EDIT] SOLVED! Problem was with the animations themselves. Also I made a couple silly mistakes in the code of my player controller. I flipped the left and right buttons. So for anyone having "animator bugs" I highly recommend double and tripple checking your scripts. Logical errors are always the worst to sort out and never show up the the debug console!!!
     
    Last edited: Aug 8, 2014