public static LiteSongItem FindJsonFile(SongItem target) { var path = AssetDatabase.GetAssetPath((SongItem)target); var selectedMidFilePath = EditorUtility.OpenFilePanelWithFilters("Import sequence from json", Directory.GetParent(path).ToString(), new string[] { "Json File", "json" }); if (string.IsNullOrEmpty(selectedMidFilePath)) { return(null); } var json = File.ReadAllText(selectedMidFilePath); if (string.IsNullOrEmpty(json)) { Debug.LogWarning("Json file empty!"); return(null); } return(LiteSongItem.FromJson(json)); }
public void LoadNotesFrom(LiteSongItem liteSongItem) { this.notes = liteSongItem.notes; }