public static NodeMap Load(string fileName) { string FullFilePath = Application.dataPath + "/" + fileName + ".bin"; Debug.Log("Loading NodeMap from " + FullFilePath); if (File.Exists(FullFilePath)) { BinaryFormatter Formatter = new BinaryFormatter(); FileStream fileStream = new FileStream(FullFilePath, FileMode.Open); NodeMap map = (NodeMap)Formatter.Deserialize(fileStream); fileStream.Close(); Debug.Log("Load success"); return(map); } Debug.LogWarning("Load failed at " + FullFilePath); return(null); }
public Path(NodeMap map, Node[] waypoints) { this.waypoints = waypoints; this.map = map; }