Moonscraper-Chart-Editor
Moonscraper-Chart-Editor copied to clipboard
adding "Detect Files" button to Audio settings page
~~Prompts the user for a directory (would prefer if this could be auto-detected)~~ Auto-detects the directory of the currently opened chart and automatically assigns files within that directory to the instrument associated iwth their name
Code side looks good, will need to pull down the branch and evaluate the layout next.
Bug found-
Auto-detect CH Audio fails to load audio when user is prompted to select a folder via file explorer.
- Open Moonscraper in Unity Editor (Windows)
- New Song
- Audio tab
- Select "Auto-Detect CH Files"
- Select a song folder containing multiple audio files (Black Window of La Porte was used in testing)
- Note audio does not load.
Upon some investigation, line 356 of SongPropertiesPanelController is stripping out 1 level of directories in the call
Path.GetDirectoryName(currentDir). For example if the path retrieved isE:/GH3 Customs/11.E John 5 Featuring Jim Root - Black Widow of La Porte, the system tries to load fromE:/GH3 Customsinstead.
Fix requested
Bug found-
Multiple assert failures are logged when attempting to use the "Auto-Detect CH Files" button.
- Open Moonscraper in Unity Editor (Windows)
- Load a song containing multiple audio files (Black Widow of La Porte was used for testing purposes)
- Song Properties
- Audio tab
- Manually clear each stem by clicking the "X" button next to each loaded audio file
- Select "Auto-Detect CH Files"
- Note assertion failure in console log of Unity Editor for each audio file loaded.
Assertion failed
UnityEngine.Debug:Assert(Boolean)
<KickTasks>d__6:MoveNext() (at Assets/Scripts/Engine/LoadingTasksManager.cs:35)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(<KickTasks>d__6&)
LoadingTasksManager:KickTasks(IList`1)
<SetAudio>d__51:MoveNext() (at Assets/Scripts/Game/UI/Menus/SongPropertiesPanelController.cs:410)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
SongPropertiesPanelController:LoadInstrumentAudioFromPath(AudioInstrument, String) (at Assets/Scripts/Game/UI/Menus/SongPropertiesPanelController.cs:332)
SongPropertiesPanelController:LoadCloneHeroAudioFromDirectory() (at Assets/Scripts/Game/UI/Menus/SongPropertiesPanelController.cs:366)
UnityEngine.EventSystems.EventSystem:Update() (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/EventSystem.cs:377)
Fix requested.