lListAsset (rowList, xmlPath);
}
/** 生成数据文件 */
static void CreatXmlListAsset(List<Row> rl, string xmlPath)
{
if (xmlPath.Contains ("ActorData.xml")) {
GActorDataList actorDataList = null;
UnityEngine.Object oldFile = AssetDatabase.LoadAssetAtPath (xmlPath, typeof(GActorDataList));
bool newFile = false;
if (oldFile) {
actorDataList = oldFile as GActorDataList;
}else{
actorDataList = new GActorDataList();
newFile = true;
}
actorDataList.ActorDataList.Clear ();
for (int i = 0; i < rl.Count; i++) {
ActorData newData = new ActorData();
Row data = rl[i];
newData.id = data["id"];
newData.type = GetInt(data["type"]);
newData.nameIds = data["nameIds"];
actorDataList.ActorDataList.Add(newData);
}
if (newFile) {
AssetDatabase.CreateAsset(actorDataList, FILE_PATH + "ActorDataList.asset");
}else{
EditorUtility.SetDirty(actorDataList);
}
}
else if (xmlPath.Contains ("ActorDataA.xml")) {
GActorDataList actorDataList = null;
UnityEngine.Object oldFile = AssetDatabase.LoadAssetAtPath (xmlPath, typeof(GActorDataList));
bool newFile = false;
if (oldFile) {
actorDataList = oldFile as GActorDataList;
}else{
actorDataList = new GActorDataList();
newFile = true;
}
actorDataList.ActorDataList.Clear ();
for (int i = 0; i < rl.Count; i++) {
ActorData newData = new ActorData();
Row data = rl[i];
newData.id = data["id"];
newData.type = GetInt(data["type"]);
newData.nameIds = data["nameIds"];
actorDataList.ActorDataList.Add(newData);
}
if (newFile) {
AssetDatabase.CreateAsset(actorDataList, FILE_PATH + "ActorDataListA.asset");
}else{
EditorUtility.SetDirty(actorDataList);
}
}
else if (xmlPath.Contains ("ActorDataB.xml")) {
GActorDataList actorDataList = null;
UnityEngine.Object oldFile = AssetDatabase.LoadAssetAtPath (xmlPath, typeof(GActorDataList));
bool newFile = false;
if (oldFile) {
actorDataList = oldFile as GActorDataList;
}else{
actorDataList = new GActorDataList();
newFile = true;
}
actorDataList.ActorDataList.Clear ();
fo