public void Fill(BeatMapMeta beatMapMeta) { string folderPath = Path.GetDirectoryName(beatMapMeta.Path); AudioPlayer.Instance.LoadAudio(Path.Combine(folderPath, beatMapMeta.SongFile)); this.slider.maxValue = AudioPlayer.Instance.ClipLengthInSeconds; }
public static BeatMapMeta LoadBeatMap(string path) { string filePath = string.Equals(Path.GetExtension(path), ".rron") ? path : Directory.GetFiles(path, @"*.rron").First(); BeatMapMeta prePath = RronConvert.DeserializeObjectFromFile <BeatMapMeta>(filePath); prePath.Path = path; return(prePath); }
private void Awake() { if (IsExistingBeatMap) { BeatMapMeta = FileLoader.LoadBeatMap(Path); this.gameObject.GetComponent <EditorConstructor>().Fill(BeatMapMeta); } else { this.editorHolder.SetActive(true); } }