Search Unity

Error: Bone weights do not match bones.

Discussion in 'Scripting' started by Guedez, Oct 19, 2018.

  1. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    I am currently combining a lot of skinned meshes and then copying the blend shapes.

    After the whole process is done, if I try to use any of the blend shapes (their values are not zero) I keep getting spammed this error with absolutelly no details. It is probably coming from the C++ part of the engine or something.

    All bones are working perfectly (unless I dare use any blend shape, then it just stops updating and stays where it was last)
     
  2. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    This happens if any of your bones weights points to the bone -1.
    The mesh will animate properly (probably because coincidently, all -1 bones had weight of 0, I can't be sure). But the blend shapes simply can't handle this.
    So be weary of using Array.IndexOf when fusing many skinned meshes together, as it will silently set a bone to -1 if it's not found due to a bug somewhere else
     
    Laiken and cyuxi like this.