public BatArg(Dictionary<string, string> keys) { Model = (BatModel)(int.Parse(keys["Model"])); Hierarchy = (DestHierarchy)(int.Parse(keys["DestHierarchy"])); PC = keys.ContainsKey("PC"); IOS = keys.ContainsKey("IOS"); AND = keys.ContainsKey("AND"); if (keys.TryGetValue("SrcFolder", out SrcFolder)) { SrcFolder = Application.dataPath + SrcFolder; SrcFolder.Replace("\\", "/"); } if (keys.TryGetValue("SrcFolderName", out SrcFolderName)) SrcFolderName.Replace("\\", "/"); SearchLoop = keys.ContainsKey("SearchLoop"); if (keys.TryGetValue("SearchPrefix", out SearchPrefix)) SearchPrefix.Replace("\\", "/"); if (keys.TryGetValue("DestFolder", out DestFolderPath)) { DestFolderPath = Application.dataPath + "/../.." + DestFolderPath; DestFolderPath.Replace("\\", "/"); } if (keys.TryGetValue("DestFolderName", out DestFolderName)) DestFolderName.Replace("\\", "/"); // Debug.Log(JsonWriter.Serialize(this)); }
public BatArg(Dictionary <string, string> keys) { Model = (BatModel)(int.Parse(keys["Model"])); Hierarchy = (DestHierarchy)(int.Parse(keys["DestHierarchy"])); PC = keys.ContainsKey("PC"); IOS = keys.ContainsKey("IOS"); AND = keys.ContainsKey("AND"); if (keys.TryGetValue("SrcFolder", out SrcFolder)) { SrcFolder = Application.dataPath + SrcFolder; SrcFolder.Replace("\\", "/"); } if (keys.TryGetValue("SrcFolderName", out SrcFolderName)) { SrcFolderName.Replace("\\", "/"); } SearchLoop = keys.ContainsKey("SearchLoop"); if (keys.TryGetValue("SearchPrefix", out SearchPrefix)) { SearchPrefix.Replace("\\", "/"); } if (keys.TryGetValue("DestFolder", out DestFolderPath)) { DestFolderPath = Application.dataPath + "/../.." + DestFolderPath; DestFolderPath.Replace("\\", "/"); } if (keys.TryGetValue("DestFolderName", out DestFolderName)) { DestFolderName.Replace("\\", "/"); } // Debug.Log(JsonWriter.Serialize(this)); }