Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug, mecanim character occasionally disappear

Discussion in 'Editor & General Support' started by forcepusher, Nov 23, 2012.

  1. forcepusher

    forcepusher

    Joined:
    Jun 25, 2012
    Posts:
    227
    when mecanim character is being initialized, first thing he does is flips and starts planking (for a couple of frames), then just disappears.
    character is being network.instantiated from the client.
    this behavior is random, sometimes he does that, and sometimes not.
    this is extremely annoying, ruining my mecanim workflow.

    also i've noticed that at first animation change character always has a frame where he pops far away from where he actually is and goes back to normal.

    Update1: closing and re-opening unity solves the problem. if client is built on bugged unity instance, then client will be bugged as well.


    i can post more info if needed, video with this bug and give the source code.
     
    Last edited: Nov 23, 2012
  2. foxter888

    foxter888

    Joined:
    May 3, 2010
    Posts:
    530
    i'm getting same issue whether the character is networked or not, it's like all of the sudden mecanim breaks and it can't read the animations and the skinned mesh dissapears. so far my fix is just to restart unity
     
  3. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Could you post repro ?

    That would be greatly appreciated!
     
  4. forcepusher

    forcepusher

    Joined:
    Jun 25, 2012
    Posts:
    227
    i've got back to working with mecanim now and here's more info:
    it does that every time any mecanim warnings occur in debug log, and keeps failing in all next tries until you restart the unity.
    i found that if you have your character rezzed in the scene when you start the game, then it goes just fine. otherwise, it throws random debug warning like "Animator has not been initialized", or "OnGUI" fail, and "parameter has not been found" when you have your game started (when it actually does exist).
    i also noticed random bug where it doesn't change the variable parameter in blend tree when you actually assign it in dropdown menu at visual programming tool (i think i did it when the game was running).
     
    Last edited: Apr 9, 2020
  5. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    We have fixed the "Animator has not been initialized" that you had.

    It will be available in next release.

    But im really surprised that this makes the mesh disapear. Can you file a bug with repro scene ?

    pp
     
  6. Wim-Wouters

    Wim-Wouters

    Joined:
    Sep 26, 2012
    Posts:
    35
  7. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Hi.

    And thanks for loging the bug.

    The problem was due to negative scale on some bone that we did not handle properly. We did a fix and it will be included in a future point release.

    Why do you use negative scales?

    pp
     
  8. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    Some of 3D Studio MAX Character Studio extra bones became negative scale when you mirror existing one.
    For instance, you have weapon mount bone on one hand or leg, then you just click on mirror option Character Studio gives. Mirrored bone appears. This bones became negative scale usually on X axes. Any mesh attached to it will have negative X axes value too.

    No one payed attention on this until it became bug in Unity. ;)
     
  9. oakshiro

    oakshiro

    Joined:
    Dec 9, 2008
    Posts:
    20
  10. KelNishi

    KelNishi

    Joined:
    Dec 31, 2012
    Posts:
    6
    I'm still getting this bug in Unity 4.1.5f1
     
  11. smallbit

    smallbit

    Joined:
    Oct 3, 2013
    Posts:
    60
    And me in 4,3 o_O
     
  12. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Could you please file a bug with repro animation!


    thanks.
     
  13. Larb

    Larb

    Joined:
    Feb 17, 2013
    Posts:
    20
    I just had the problem in the current version of Unity. One possible cause could be that my rig doesen't have shoulders (collarbones) as they were optional in the avatar definition scene, but perhaps they should still be on the imported rig as unity couldn't find the arms on its own? I'm just spitballin' here, but me deleting the shoulder bone could be read as a bone with length 0 by Unity. Anyway I will add shoulders to my rig tomorrow and report back.
     
  14. Larb

    Larb

    Joined:
    Feb 17, 2013
    Posts:
    20
    I found the error on my end. I had duplicated a ragdoll version of my character and added the animator to it, once i went through the hierachy of that character and removed all the joints and rigidbodies, none of my characters dissapear anymore.