增加空判断

This commit is contained in:
shenjianxing 2024-12-19 11:52:56 +08:00
parent ca9f64276d
commit 421a072c7f
2 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,10 @@ public class Launch : MonoBehaviour
yield return UIKit.OpenPanelAsync<UILoading>();
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 UIKit.OpenPanelAsync<UIModeSelect>();
UIKit.HidePanel<UILoading>();

View File

@ -134,7 +134,6 @@ namespace XMLTool
// ³õʼ»¯AppData¶ÔÏó
AppData appData = new AppData
{
preLoad = new PreLoad(),
Modules = new List<Module>(),
};
@ -143,6 +142,7 @@ namespace XMLTool
var preLoadElement = appDataElement.Element("PreLoad");
if (preLoadElement!=null)
{
appData.preLoad = new PreLoad();
foreach (XElement actionElement in preLoadElement.Elements("Action"))
{
var action = ParseAction(actionElement);