mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
优化Background组件的生效条件,需要有单独的父节点
This commit is contained in:
@@ -112,6 +112,21 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public static void DestoryGameObject(Transform parent, string childName)
|
||||
{
|
||||
if (parent == null) return;
|
||||
var go = parent.Find(childName);
|
||||
if (go != null)
|
||||
{
|
||||
GameObject.DestroyImmediate(go.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DestoryGameObject(GameObject go)
|
||||
{
|
||||
if (go != null) GameObject.DestroyImmediate(go);
|
||||
}
|
||||
|
||||
public static string GetFullName(Transform transform)
|
||||
{
|
||||
string name = transform.name;
|
||||
|
||||
Reference in New Issue
Block a user