Sorry for my bad english, i m french.
i have a problem with clothes . ( i m on Unity 2018.3.6f1)
I have buy an avatar.
I created clothes for this avatar.
everything is set in humanoid rig.
If I import the avatar change with the clothes, it works well.
If i import the clothes alone, it’s dont follow the bones avatar and remains in Tpose.
I had this problem with the avatar of Daz / Genesis. a script allowed to correct this but this script does not work on this new avatar. could someone please help me?
Sure, i can pay for help to fix that .
thank you.
The Daz Script
Code (CSharp):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class Copy_Bones : MonoBehaviour {
public GameObject SourceObject;
// Use this for initialization
void Start () {
Copy();
}
void Copy()
{
if (SourceObject == null) return;
var sourceRenderer = SourceObject.GetComponent<SkinnedMeshRenderer>();
var targetRenderer = GetComponent<SkinnedMeshRenderer> ();
if (sourceRenderer == null) return;
if (targetRenderer == null) return;
targetRenderer.bones =
sourceRenderer.bones.Where(b => targetRenderer.bones.Any (t => t.name == b.name)).ToArray ();
}
}