private int LoadNumberOfRecordings() { if (fileName == "" || fileName == null) { return(-1); } using (FileStream fs = File.OpenRead(fileName)) { return(Unpackager.Peak(fs)); } }
public void Load(string dir) { Directory.CreateDirectory(dir); AssetDatabase.Refresh(); using (FileStream fs = File.OpenRead(path)) { var recordings = Unpackager.Unpackage(fs); foreach (var record in recordings) { RecordingUtil.SaveToAssets(record, record.RecordingName, dir); } } }
public LoadSelection(string path) { this.path = path; error = ""; try { using (FileStream fs = File.OpenRead(path)) { numberRecordings = Unpackager.Peak(fs); } } catch (System.Exception e) { error = e.ToString(); numberRecordings = -1; } }