void Parse() { forest = new DialogueForest(); forest.ParseFromFile(idpFilePath); Debug.Log("Parsed successfully"); }
public static DialogueForest DeserializeFromBinary(string fileName) { if (!File.Exists(fileName)) { Debug.LogError("Deserialization attempt failed. File " + fileName + " doesn't exist"); return(null); } BinaryFormatter bf = new BinaryFormatter(); FileStream file = File.Open(fileName, FileMode.Open); DialogueForest forest = (DialogueForest)bf.Deserialize(file); file.Close(); forest.PopulateDict(); return(forest); }
public void CombineWith(DialogueForest forest) { var parsedDict = forest.treeDict; parsedDict.ToList().ForEach(x => treeDict.Add(x.Key, x.Value)); }
void Deserialize() { forest = DialogueForest.DeserializeFromBinary(binaryFilePath); Debug.Log("Deserialized successfully"); }