mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
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:
parent
2d9e63c83a
commit
2ad706b3f5
@ -65,11 +65,11 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
// Heuristic search - usually there'll be root -> Armature -> (single child) Hips
|
// Heuristic search - usually there'll be root -> Armature -> (single child) Hips
|
||||||
foreach (Transform child in outfitRoot.transform)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user