Ejemplo n.º 1
0
    /// <summary>
    /// 关联子UI,统一参与管理
    /// </summary>
    /// <param name="subPanelPath"></param>
    /// <param name="subUI"></param>
    public void AttachSubPanel(string subPanelPath, UIBase subUI, UILevel uiLevel)
    {
        if (null == subUIList)
        {
            subUIList = new List <UIBase>();
        }
        if (subUI == null)
        {
            return;
        }
        if (string.IsNullOrEmpty(subPanelPath))
        {
            return;
        }
        GameObject subUIObj = Panel.FindChildByPath(subPanelPath);

        if (null != subUIObj)
        {
            subUI.CreateWithGO(subUIObj, uiLevel);
            subUIList.Add(subUI);
        }
    }