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
This apparently only happens in Windows. Unless you want to directly change code inside UnityStandaloneFileBrowser, you have treat calls differently on Windows.
Here is my solution for it:
voidShowDialog(stringtitle){
#if PLATFORM_STANDALONE_WIN
Task.Run(()=> StandaloneFileBrowser.OpenFilePanel(title,"","",false)).ContinueWithOnMainThread(OnCallbackTask);
#else
StandaloneFileBrowser.OpenFilePanelAsync(title,"","",false, OnCallback);
#endif
}privatevoidOnCallbackTask(Task<string[]>task){if(task.Exception !=null){// Some kind of exception happened in OpenFilePanel, somehow. Treat it however you see fit here.
OnCallback([]);}else{
OnCallback(task.Result);}}privatevoidOnCallback(string[]paths){// Our usual callback}
Note that it seems that the Unity app cannot close while the file dialog is still open - it will just hang if you press Alt+F4 until the dialog is closed. I haven't found a solution for that yet.
Opening the file picker panel halts the entire unity application, even if started in Coroutine or while using
OpenFilePickerAsync()
.Is it possible to open a instance that is decoupled from the rest of the application?
The text was updated successfully, but these errors were encountered: