修复肌肉显示bug
This commit is contained in:
parent
e03713377d
commit
8446452f38
File diff suppressed because it is too large
Load Diff
@ -40,19 +40,33 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
string name = bodys[index];
|
string name = bodys[index];
|
||||||
var body = root.subBody[name];
|
var body = root.subBody[name];
|
||||||
Utility.FindObj(body.Path)?.SetActive(true);
|
var obj = Utility.FindObj(body.Path);
|
||||||
|
if (obj!=null)
|
||||||
|
{
|
||||||
|
foreach (var item in obj.GetComponentsInChildren<Transform>(true))
|
||||||
|
{
|
||||||
|
item.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Sub()
|
public void Sub()
|
||||||
{
|
{
|
||||||
if (index > 0)
|
if (index > 0)
|
||||||
{
|
{
|
||||||
index--;
|
|
||||||
string name = bodys[index];
|
string name = bodys[index];
|
||||||
var body = root.subBody[name];
|
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--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user