Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

weird NetworkSyncAnimation bug

Discussion in 'Multiplayer' started by solid, Jun 17, 2010.

  1. solid

    solid

    Joined:
    Jan 15, 2010
    Posts:
    132
    im using the 3rd person network animation sync script..
    but ive run into some strange problem.

    the animations are supposed to be enumerated after their index, but a animation i have wich i index as 0 always turn out as a 4. and no matter what i do with the animation list and the animation component, it turn out as 4. and those before 4 does not work..

    and when i set my first animation to index 0(idle),
    public AniStates currentAnimation = AniStates.idle;

    currentAnimation uses enumeration 4 instead..

    its like 4 = AniStates 0.. ???

    why does my list not start at 0?
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Can you post the code where you declare the AniStates enum? (I assume you've modified what is in the original script.)
     
  3. solid

    solid

    Joined:
    Jan 15, 2010
    Posts:
    132
    i somehow found the magic combination.. and i cant change positions nor index number for it to work..
    it works kindof now if i declare them in this order:

    Code (csharp):
    1.  
    2.     public enum AniStates
    3.     {
    4.        
    5.         run ,
    6.         hit,
    7.         jump = 2,
    8.         idle = 4,
    9.         left1 = 5,
    10.         left2 = 6 ,
    11.         right1 = 7,
    12.         right2 = 8,
    13.        
    14.     }
    15.  

    the rest of the script is as it was.

    its weird cause i only have 0 - 7 in the animation list.

    but it works ..