Search Unity

Character parts customization: apply bones to mesh

Discussion in 'Editor & General Support' started by Eastrall, Jan 9, 2021.

  1. Eastrall

    Eastrall

    Joined:
    Dec 14, 2020
    Posts:
    31
    Hi everyone,


    I'm relatively new to unity, started a couple weeks ago and so far I managed to setup a character with multiple parts, like hair, head, and body. Here's how it looks like:

    I also managed to import some animation thanks to https://www.mixamo.com/ and everything works perfectly well; for now...

    Now, I'm struggling with the "change" part mecanism. I'd like to swap the "nude" body mesh part, to an "armor" mesh or any other body mesh. Problem is, when I change the model in the SkinnedMeshRenderer it tells me the following:
    upload_2021-1-9_12-0-33.png

    Which gives the following result:


    I did some reseach about this error message, and it actually makes sense, the given mesh doesn't have any bone setup, bone weights or such.

    I would like to know if it's possible to use "common" skeleton for every models and assign it throught code?

    Thanks,
    Eastrall
     
    Last edited: Jan 11, 2021