mirror of https://github.com/axmolengine/axmol.git
Fix parser compatible for layer project file
This commit is contained in:
parent
2d805b052b
commit
faee3e7807
|
@ -269,7 +269,7 @@ std::string FlatBuffersSerialize::serializeFlatBuffersWithXMLFile(const std::str
|
||||||
else
|
else
|
||||||
nameElem = nameElem->Next();
|
nameElem = nameElem->Next();
|
||||||
}
|
}
|
||||||
if (rootType == "GameNodeObjectData") // for adaptate old version
|
if (rootType == "GameNodeObjectData" || rootType == "GameLayerObjectData") // for adaptate old version
|
||||||
rootType = "NodeObjectData";
|
rootType = "NodeObjectData";
|
||||||
|
|
||||||
nodeTree = createNodeTree(objectData, rootType);
|
nodeTree = createNodeTree(objectData, rootType);
|
||||||
|
@ -1318,7 +1318,7 @@ FlatBufferBuilder* FlatBuffersSerialize::createFlatBuffersWithXMLFileForSimulato
|
||||||
else
|
else
|
||||||
nameElem = nameElem->Next();
|
nameElem = nameElem->Next();
|
||||||
}
|
}
|
||||||
if (rootType == "GameNodeObjectData") // for adaptate old version
|
if (rootType == "GameNodeObjectData" || rootType == "GameLayerObjectData") // for adaptate old version
|
||||||
rootType = "NodeObjectData";
|
rootType = "NodeObjectData";
|
||||||
nodeTree = createNodeTreeForSimulator(objectData, rootType);
|
nodeTree = createNodeTreeForSimulator(objectData, rootType);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue