Closed frere97 closed 3 years ago
Can I see your coroutine? And make sure to call your coroutine with StartCoroutine.
IEnumerator ShowLoadDialogCoroutine() { // Show a load file dialog and wait for a response from user // Load file/folder: file, Allow multiple selection: true // Initial path: default (Documents), Title: "Load File", submit button text: "Load" yield return FileBrowser.WaitForLoadDialog( false, true, null, "Load File", "Load" );
// Dialog is closed
// Print whether the user has selected some files/folders or cancelled the operation (FileBrowser.Success)
Debug.Log( FileBrowser.Success );
if( FileBrowser.Success )
{
// Print paths of the selected files (FileBrowser.Result) (null, if FileBrowser.Success is false)
for( int i = 0; i < FileBrowser.Result.Length; i++ )
Debug.Log( FileBrowser.Result[i] );
// Read the bytes of the first file via FileBrowserHelpers
// Contrary to File.ReadAllBytes, this function works on Android 10+, as well
byte[] bytes = FileBrowserHelpers.ReadBytesFromFile( FileBrowser.Result[0] );
}
}
it is the one u use in your github example
You are calling it using StartCoroutine( ShowLoadDialogCoroutine() );
and not just ShowLoadDialogCoroutine();
, am I right?
yes StartCoroutine( ShowLoadDialogCoroutine() );
i've putted a debbug before and after the return, and just the one before was called
This is weird. Are there absolutely no error messages in console? Does the file browser show up properly? Does the log still not show up after closing the dialog?
the only error that appears is referent for Vr because the window closes, but the vr is still trying to hit a canvas (but i´ve tried in onverlay, the erro does not appears, and i still does not get the message), the window display correctly and the log still does not shows up after closing the window
On which Unity version does this occur? Can I see your complete script so that I can just copy&paste it on my Unity editor and test it?
2019.4.01f1, it used to work, some weeks ago, but when i reimported the project it broked, the script is the one u provide in the homepage with the name of "example code". i will try something idiot that i should had tried a time ago, restart unity XD
yeah, reloading unity didn't worked
I've copy&pasted the example script to my 2019.4.0f1 project. I can see the logs without any issues:
I'd recommend you to create a fresh new project, import the plugin there and see what happens. It will work because it works on my Unity project lol. Then, you need to figure out what's going on with your actual project.
thanks man XD, i will try to figure out what's happening, if i got something i update in here
i created a project from zero, and this still does not works XD
probably is the computer of my work that is blocking the app from exploring and oppening the archive
If you press Cancel, a "False" log must be printed to console, no matter what. I don't know why this isn't the case for you but I could clearly see the logs in my empty project, so I'm closing this Issue :/
the problem was me beeing dumb XD
i was putting the prefab in scene and the script to handler him together, so, when the object was beeing deactivated, the script stopped. sorry for making u loose your time
Happy to hear that the issue is resolved :)
using the base code i can't pass from "yield return FileBrowser.WaitForLoadDialog( false, true, null, "Load File", "Load" );", not even the debug return a message, i'm using the version in the asset store