UIWidget.CreatePanel C# (CSharp) Method

CreatePanel() public method

Ensure we have a panel referencing this widget.
public CreatePanel ( ) : void
return void
    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;
            }
        }
    }

Usage Example

Beispiel #1
0
	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));
	}
All Usage Examples Of UIWidget::CreatePanel