You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FileBrowser.WaitForSave/LoadDialog coroutine returns too early on Android #107
When using FileBrowser.WaitForSaveDialog(...) or FileBrowser.WaitForLoadDialog(...) coroutines, they end before FileBrowser.Success becomes true on android, causing the example coroutine in the readme of the project to not work properly.
Reproduction steps
IEnumeratorTestRoutine(){yieldreturnFileBrowser.WaitForSaveDialog(FileBrowser.PickMode.Files,false,null,"save.txt","TITLE","Save");Debug.Log($"FileBrowser.Success: {FileBrowser.Success}");if(FileBrowser.Success)// This never becomes true{stringfilePath=FileBrowser.Result[0];Debug.Log($"File path: {filePath}");FileBrowserHelpers.WriteTextToFile(filePath,"test file content 123123");Debug.Log("Saved");}}
If I additionally wait for FileBrowser.Success to become true, the rest of the code works fine, but now if the user clicks the "Cancel" button, the coroutine would get stuck waiting forever.
IEnumeratorTestRoutine(){yieldreturnFileBrowser.WaitForSaveDialog(FileBrowser.PickMode.Files,false,null,"save.txt","TITLE","Save");yieldreturnnewWaitUntil(()=>FileBrowser.Success);// This line is needed to actually wait for the dialog to finishDebug.Log($"FileBrowser.Success: {FileBrowser.Success}");if(FileBrowser.Success){stringfilePath=FileBrowser.Result[0];Debug.Log($"File path: {filePath}");FileBrowserHelpers.WriteTextToFile(filePath,"test file content 123123");Debug.Log("Saved");}}
Platform specs
Unity version: 2022.3.50f1
Platform: Android
Device: Samsung Galaxy A55 5G
How did you download the plugin: github repo link in manifest.json
It was caused by 1750c04 's RequestPermissionAsync implementation. Coroutine was waiting for the dialog to become inactive but the RequestPermissionAsync function wasn't activating the file browser until the permission is granted, so the coroutine was completing immediately.
Activity
yasirkula commentedon May 20, 2025
It was caused by 1750c04 's RequestPermissionAsync implementation. Coroutine was waiting for the dialog to become inactive but the RequestPermissionAsync function wasn't activating the file browser until the permission is granted, so the coroutine was completing immediately.
Fixed WaitForSaveDialog no longer working on Android (fixed yasirkula…