修复肌肉显示bug

This commit is contained in:
shenjianxing 2025-05-09 10:54:41 +08:00
parent e03713377d
commit 8446452f38
2 changed files with 326 additions and 312 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,8 +40,15 @@ namespace QFramework.Example
{
string name = bodys[index];
var body = root.subBody[name];
Utility.FindObj(body.Path)?.SetActive(true);
index++;
var obj = Utility.FindObj(body.Path);
if (obj!=null)
{
foreach (var item in obj.GetComponentsInChildren<Transform>(true))
{
item.gameObject.SetActive(true);
}
index++;
}
}
}
@ -49,10 +56,17 @@ namespace QFramework.Example
{
if (index > 0)
{
index--;
string name = bodys[index];
var body = root.subBody[name];
Utility.FindObj(body.Path)?.SetActive(false);
var obj = Utility.FindObj(body.Path);
if (obj!=null)
{
foreach (var item in obj.GetComponentsInChildren<Transform>(true))
{
item.gameObject.SetActive(false);
}
index--;
}
}
}
}