Search all children of the armature when running setup outfit (#108)

https://github.com/bdunderscore/modular-avatar/issues/101

Closes: #101
This commit is contained in:
Koarare 2022-11-29 13:34:13 +09:00 committed by GitHub
parent 2d9e63c83a
commit 2ad706b3f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,11 +65,11 @@ namespace nadena.dev.modular_avatar.core.editor
// Heuristic search - usually there'll be root -> Armature -> (single child) Hips
foreach (Transform child in outfitRoot.transform)
{
if (child.childCount == 1)
foreach (Transform tempHip in child)
{
if (child.GetChild(0).name.Contains(avatarHips.name))
if (tempHip.name.Contains(avatarHips.name))
{
outfitHips = child.GetChild(0).gameObject;
outfitHips = tempHip.gameObject;
}
}
}