public void CreatePanel() { if (mPanel == null && enabled && NGUITools.GetActive(gameObject) && material != null) { mPanel = UIPanel.Find(cachedTransform); if (mPanel != null) { CheckLayer(); mPanel.AddWidget(this); mChanged = true; } } }
static void CallCreatePanel (Transform t) { UIWidget w = t.GetComponent<UIWidget>(); if (w != null) w.CreatePanel(); for (int i = 0, imax = t.childCount; i < imax; ++i) CallCreatePanel(t.GetChild(i)); }