mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
优化MultiComponentMode开启后的编辑体验和组件刷新 #128
This commit is contained in:
@@ -124,6 +124,19 @@ namespace XCharts
|
||||
GameObject.DestroyImmediate(go.gameObject);
|
||||
}
|
||||
}
|
||||
public static void DestoryGameObjectByMatch(Transform parent, string match)
|
||||
{
|
||||
if (parent == null) return;
|
||||
var childCount = parent.childCount;
|
||||
for (int i = childCount - 1; i >= 0; i--)
|
||||
{
|
||||
var go = parent.GetChild(i);
|
||||
if (go != null && go.name.StartsWith(match))
|
||||
{
|
||||
GameObject.DestroyImmediate(go.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DestoryGameObject(GameObject go)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user