void LoadKML(float scale) { MegaShape ms = (MegaShape)target; string filename = EditorUtility.OpenFilePanel("KML File", lastpath, "kml"); if ( filename == null || filename.Length < 1 ) return; lastpath = filename; //bool opt = true; //if ( ms.splines != null && ms.splines.Count > 0 ) // opt = EditorUtility.DisplayDialog("Spline Import Option", "Splines already present, do you want to 'Add' or 'Replace' splines with this file?", "Add", "Replace"); //int startspline = 0; //if ( opt ) // startspline = ms.splines.Count; MegaKML kml = new MegaKML(); kml.KMLDecode(filename); Vector3[] points = kml.GetPoints(ImportScale); ms.BuildSpline(ms.selcurve, points, true); }