...
/// <summary>
/// 删除 父物体 的所有 子物体
/// </summary>
/// <param name="trans_">父物体</param>
public static void destoryChildGameObject(Transform trans_)
{
if (trans_ != null
&& trans_.childCount > 0)
for (int i = 0; i < trans_.childCount; i++)
GameObject.Destroy(trans_.GetChild(i).gameObject);
}//
...
...
/// <summary>
/// 删除 父物体 的所有 包含组件名称为componentName的子物体
/// </summary>
/// <param name="trans_">父物体</param>
/// <param name="componentName">组件名称</param>
public static void destoryChildGameObjectByCompontent(Transform trans_, string componentName)
{
//Debug.Log( " " + trans_.childCount);
if (trans_ != null
&& trans_.