module支持有序加载
This commit is contained in:
parent
f54e479c9b
commit
ee4c50c696
@ -58,10 +58,15 @@ namespace QFramework
|
||||
XDocument doc = XDocument.Parse(xmlStr);
|
||||
// »ñÈ¡¸ùÔªËØ
|
||||
XElement moduleXml = doc.Root;
|
||||
if (string.IsNullOrEmpty(index))
|
||||
{
|
||||
// ÎÞÐò¼ÓÔØ
|
||||
XmlParser.LoadModule(moduleXml, Global.Instance.appData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.moduleDict.Add(index, moduleXml);
|
||||
|
||||
// 直接加载会导致无序
|
||||
//XmlParser.LoadModule(moduleXml, Global.Instance.appData);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -41,8 +41,8 @@ public class Launch : MonoBehaviour
|
||||
yield return new WaitUntil(() => isLoadFinished == true);
|
||||
if (Global.Instance.appData.preLoad != null && Global.Instance.appData.preLoad.action != null)
|
||||
{
|
||||
yield return ActionHelper.GetActionAndSub(Global.Instance.appData.preLoad.action).Start(this);
|
||||
}
|
||||
yield return ActionHelper.GetActionAndSub(Global.Instance.appData.preLoad.action).Start(this, () =>
|
||||
{
|
||||
// 暂时放在这里
|
||||
if (Global.moduleDict.Count > 0)
|
||||
{
|
||||
@ -55,6 +55,8 @@ public class Launch : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
yield return UIKit.OpenPanelAsync<UIModeSelect>();
|
||||
UIKit.HidePanel<UILoading>();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user