internal static void DestroyChild(GameObject parent, string name)
        {
            GameObject gameObject = NGUIUtil.FindChild(parent, name);

            if (gameObject)
            {
                gameObject.transform.parent = null;
                UnityEngine.Object.Destroy(gameObject);
            }
        }
        internal static GameObject SetCloneChild(GameObject parent, GameObject orignal, string name)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(orignal);

            if (gameObject == null)
            {
                return(null);
            }
            gameObject.name = name;
            NGUIUtil.SetChild(parent, gameObject);
            return(gameObject);
        }
 internal static GameObject FindChild(GameObject go, string s)
 {
     if (go == null)
     {
         return(null);
     }
     foreach (Transform transform in go.transform)
     {
         if (transform.gameObject.name == s)
         {
             GameObject result = transform.gameObject;
             return(result);
         }
         GameObject gameObject = NGUIUtil.FindChild(transform.gameObject, s);
         if (gameObject)
         {
             GameObject result = gameObject;
             return(result);
         }
     }
     return(null);
 }
 internal static Transform FindChild(Transform tr, string s)
 {
     return(NGUIUtil.FindChild(tr.gameObject, s).transform);
 }