diff --git a/Assets/Scripts/Xml/XmlParser.cs b/Assets/Scripts/Xml/XmlParser.cs index a2a85692..1e664b5e 100644 --- a/Assets/Scripts/Xml/XmlParser.cs +++ b/Assets/Scripts/Xml/XmlParser.cs @@ -141,12 +141,16 @@ namespace XMLTool // 解析预加载动作 var preLoadElement = appDataElement.Element("PreLoad"); - foreach (XElement actionElement in preLoadElement.Elements("Action")) + if (preLoadElement!=null) { - var action = ParseAction(actionElement); - appData.preLoad.action = action; + foreach (XElement actionElement in preLoadElement.Elements("Action")) + { + var action = ParseAction(actionElement); + appData.preLoad.action = action; + } } + // 加载模块数据 LoadModules(appDataElement, appData); diff --git a/Doc/Xml閰嶇疆鏂囨。.xml b/Doc/Xml閰嶇疆鏂囨。.xml index 0021a891..cef7b692 100644 --- a/Doc/Xml閰嶇疆鏂囨。.xml +++ b/Doc/Xml閰嶇疆鏂囨。.xml @@ -74,6 +74,17 @@ + + + + + + + + + + + Scene