File Browser is a wrapper for native file dialogs on Windows, macOS, Linux and UWP (WSA).
It also supports custom file browsers which allows it to be used on any platform!
Furthermore, it offers methods to load and save files, search for files and editing files with the default application of the operating system.
Features: Filesystem operations
Open file/folder, save file dialogs supported
Multiple file selection
Multiple folder selection on macOS and Linux
Load and save file data (incl. built-in support for images and text-files)
Search for files
Get drives for a device and folders for a location
Open file or folder location
Copy or move files and folders
Edit file with the default application
Synchronous and asynchronous (non-blocking) methods
Edit > Project Settings > Player > Other Settings > Scripting Runtime Version: âExperimental (.NET 4.6 Equivalent)â
(Windows standalone application)
However, I got the errors âUnity Editor or Application.exe has stopped workingâ.
Does your asset only work if the API compatibility level is .NET 2.0?
If you like our product/support and have some spare time left, please rate us at the store. Or even better, write a review - itâs very much appreciated.
Hello
I tried to access from Example.cs to a static variable in a script mine. Donât get it. I guess that the cause is that Example.cs belongs to a namespace. For example, how could I access the public static variable life in my script data1?
It would be very useful to have a method that will be triggered when the user closes the Windows browser. (Or it does exist and I have not seen it).
Sorry if I ask things very easy. I do not have much experience in programming.
Example.cs only shows how you could use FB in your own script.
An example:
//add this to the start of the script
using Crosstales.FB;
//somewhere inside your code
string path = FileBrowser.OpenSingleFile("Open File", "", "");
Unity is suspended while FB is open, this means, the execution will continue after you closed the dialog. Therefor, no trigger is needed right now.
You could also try the async calls, but they are experimental atm.
Thank you very much. Just what I needed. I undestand now that really this asset is easy to use and works great. I had shipwrecked
in the documentation so extensive that has the asset. I miss a documentation easy for dummies.
Thank you very much again.
When ExtensionFilter[ ] is set to SaveFile(), only its first element is valid. (In the application for Windows 10.)
When ExtensionFilter[ ] is set to OpenFiles(), it works without problems.
Even if I edit FileBrowser/Demo/Scripts/Examples.cs and use it, ExtensionFilter[ ] does not work well with SaveFile().
Is there a better way to specify multiple extensions with SaveFile()?
Hello, love your asset but Iâve encountered a problem. When I compile my small project (using/targeting osx) and run it, if I try to load a file and the path contains a folder with a space in the name, the path your asset returns replaces the space with â%20.â This substitution messes up any attempt to load the file at that path. Strangely, this doesnât happen when I run my project in the editor (havenât tried it on Windows). Am I missing something? Thank you!
⊠but âpathâ returns an empty string and the created file is a ghost (only appears in Windows Explorer Quick Access but nowhere else and I get an error saying âFile cannot be foundâ when trying to open it.
Iâm using the OpenFile() feature quite the same way and it works fine:
Iâm not sure what youâre trying to do. The âSaveFileâ-method doesnât create a file, it only returns the path of your desired file location. You have to create the file on your own.