Exemplo n.º 1
0
 void FindAllCanHandleWidget(Transform trans)
 {
     for (int i = 0; i < trans.childCount; i++)
     {
         Transform childTrans = trans.GetChild(i);
         QUIMark   uiMark     = childTrans.GetComponent <QUIMark>();
         if (null != uiMark)
         {
             if (mUIComponentsDic.ContainsKey(childTrans.name))
             {
                 Debug.LogError("Repeat Id: " + childTrans.name);
             }
             else
             {
                 mUIComponentsDic.Add(childTrans.name, childTrans);
             }
         }
         FindAllCanHandleWidget(childTrans);
     }
 }
Exemplo n.º 2
0
    private void FindAllMarkTrans(Transform trans)
    {
        for (int i = 0; i < trans.childCount; i++)
        {
            Transform          childTrans = trans.GetChild(i);
            QFramework.QUIMark uiMark     = childTrans.GetComponent <QFramework.QUIMark>();
            if (null != uiMark)
            {
                if (!m_dicNameToTrans.ContainsKey(childTrans.name))
                {
                    m_dicNameToTrans.Add(childTrans.name, childTrans);
                }
                else
                {
                    Debug.LogError("Repeat key: " + childTrans.name);
                }
            }

            FindAllMarkTrans(childTrans);
        }
    }
Exemplo n.º 3
0
    private void FindAllMarkTrans(Transform rootTrans, Transform curTrans, string transFullName)
    {
        for (int i = 0; i < curTrans.childCount; i++)
        {
            Transform          childTrans = curTrans.GetChild(i);
            QFramework.QUIMark uiMark     = childTrans.GetComponent <QFramework.QUIMark>();
            if (null != uiMark)
            {
                if (!m_dicNameToTrans.ContainsKey(childTrans.name))
                {
                    m_dicNameToTrans.Add(childTrans.name, childTrans);
                    mdicNameToFullName.Add(childTrans.name, transFullName + childTrans.name);
                }
                else
                {
                    Debug.LogError("Repeat key: " + childTrans.name);
                }
            }

            FindAllMarkTrans(rootTrans, childTrans, transFullName + childTrans.name + "/");
        }
    }