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

Mecanim match target + network makes Unity crash?

Discussion in 'Animation' started by Shaffe, Nov 21, 2013.

  1. Shaffe

    Shaffe

    Joined:
    Feb 22, 2012
    Posts:
    2
    Hello,
    I'm using mecanim in a network context.
    Here is the setup scenario.
    When the game scene has been loaded on both clients, I instantiate the avatars' prefab.
    When this Is done, I notice the server that both clients are ready and the server send a RPC to both clients. A state changes to allow the players to move.
    On the avatar prefab I have a CharacterController, an animator and a custom avatar controller which uses CharacterController to make the avatar move.
    When I launch the game in the Unity editor or with a Windows standalone, it crashes.
    I've debugged the standalone app with Visual Studio and it appears that unity crashes on the animator.IsMatchingTarget function called by the method animator.MatchTarget() in animator.cpp. I don't see any component I created in the stack, MatchTarget is called automatically.
    So I've tried to disable the animator and the game didn't crashes.
    The tricky thing is that I don't know when I can enable the animator. If it's done too soon, Unity crashes.
    Even if the level is loaded and that prefabs are instantiated, things are not set at the same time on every clients, and that impact when the crash occurs. I don't know how to track when everything is really ready.

    What am I doing wrong? is there a property on the animator I have to change? Is there something needed for the matching target to work properly? Is there anything that may help you to help me? :)
    I'm using Unity 4.3.

    Thank you
     

    Attached Files:

    Last edited: Nov 21, 2013