File tree Expand file tree Collapse file tree
Assets/Scripts/Presenter/MusicSelector Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,10 +32,15 @@ void Start()
3232 {
3333 ResetEditor ( ) ;
3434
35+ Settings . WorkSpaceDirectoryPath
36+ . Subscribe ( workSpacePath => directoryPathInputField . text = workSpacePath + "/Musics/" ) ;
37+
3538 directoryPathInputField . OnValueChangeAsObservable ( )
3639 . Subscribe ( path => MusicSelector . DirectoryPath . Value = path ) ;
37- MusicSelector . DirectoryPath . Subscribe ( path => directoryPathInputField . text = path ) ;
38- MusicSelector . DirectoryPath . Value = Settings . WorkSpaceDirectoryPath . Value + "/Musics/" ;
40+
41+ MusicSelector . DirectoryPath
42+ . Subscribe ( path => directoryPathInputField . text = path ) ;
43+
3944
4045 if ( ! Directory . Exists ( MusicSelector . DirectoryPath . Value ) )
4146 {
@@ -92,7 +97,7 @@ IEnumerator LoadMusic(string fileName)
9297 void LoadEditData ( )
9398 {
9499 var fileName = Path . GetFileNameWithoutExtension ( EditData . Name . Value ) + ".json" ;
95- var directoryPath = Application . persistentDataPath + "/Notes/" ;
100+ var directoryPath = MusicSelector . DirectoryPath . Value . Substring ( 0 , MusicSelector . DirectoryPath . Value . Length - "/Musics/" . Length ) + "/Notes/" ;
96101 var filePath = directoryPath + fileName ;
97102
98103 if ( File . Exists ( filePath ) )
You can’t perform that action at this time.
0 commit comments