uimgr 子控件主动往管理类注册自己

///


/// 供UIBehaviour调用,UIBehaviour每个控件都会动态挂载,并且在awake里面调用,注册自己
///

///
///
///
public void RegistGameObject(string panelName, string widgeName, GameObject widge)
{
if (!allChild.ContainsKey(panelName))
{
allChild.Add(panelName, new Dictionary());
}

if (!allChild[panelName].ContainsKey(widgeName))
{
allChild[panelName].Add(widgeName, widge);
}
else
{
Debug.LogError(" has been registed => " + widgeName);
}
}


————————————————

转载于:https://www.cnblogs.com/ly570/p/11535808.html

你可能感兴趣的:(uimgr 子控件主动往管理类注册自己)