Adding clothes to a character rig in game

I can import characters including clothes from Makehuman. I can enable and disable clothes in game to change it’s outfit. But I want to add additional clothes which are not already included with Makehuman characters and are in separate prefab. These additional clothes could be having bones/rigs attached with them or not. But I want to Instantiate the cloth on a button click and then add it to the animated character and it’s rigs too, so that it matches with the animation and will look like the character is wearing that dress/cloth. Any idea how can I do that?

It’s possible, and it’s pretty easy. Here is everything you need:

  1. The script itself
  1. A little bit of extra cautionary information from myself:

If any parts of the body show through and worn clothes, you could try using a seperate material for each limb and making that one transparent when it is covered.