UIWidget.CreatePanel C# (CSharp) 메소드

CreatePanel() 공개 메소드

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

예제 #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