File Browser - Native file browser

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
  • File extension filters
  • Expand it via custom file browsers

Documentation & control

  • Test all dialogs within the editor

  • Powerful API for maximum control

  • Detailed demo scenes

  • Comprehensive documentation and support

  • Full source code (including libraries)

Compatibility

Some impressions:

Video:

AssetStore:
File Browser PRO
Essential Tools Bundle
All Tools Bundle

Our other assets

Demos:
WebGL
Windows
Mac
Linux
Android

Changes

Feel free to download and test it.
Any constructive comments are very welcome!

Cheers
Stefan

5 Likes

I had the plan create it, but you made it sooner, Thanks, Keep up the good work, nicely done.

Thanks.

1 Like

Thank you for the kind words!

If you or anybody is interested in getting it right now, just drop me an email :slight_smile:

So long,
Stefan

Hello,

I tried your asset with the following settings.

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?

Thank you

Hi

Thank you for using FB!

Yes, I made a mistake in the “SetApiLevel”-script.
FB works with newer .NET-versions.

Here is a fixed version :slight_smile:

Cheers
Stefan

3377784–265022–SetApiLevel.cs (1.19 KB)

Hello,

Now, FB works perfectly with .NET 4.6 compatible settings!
Your asset is smart and great!!!

I really appreciate your kind response.
Thank you very much!

1 Like

You’re welcome!

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.

So long,
Stefan

Hi,

I rated and wrote a review at the store right now.
Very good asset!

Thank you

1 Like

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.

Many thanks for your wonderful asset!!!

Hi Raul

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.

I hope this gets you further.

Cheers
Stefan

1 Like

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.

Hi,

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()?

Thank you

Hi

This is a limitation of the Unity editor. This won’t happen in the build!

Cheers
Stefan

1 Like

Hi,

As you said, there were no problems with the built apps!

I seem to have jumped to the conclusion.
I’m thankful for your kind advice.

Thank you very much!

1 Like

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!

Hi

We will fix that in the next release.
Meanwhile, just use the string method “Replace” like:

myFile = myFile.Replace("%20", " ");

I hope this helps you further.

Cheers
Stefan

Hi Stefan,

I’m having trouble with the SaveFile() feature. I have tried to use it as follows:

public static string SaveFile()
    {
        string extensions = "hproj";

        string path = FileBrowser.SaveFile("Save File", "", "newproject", extensions);

        HistoLogger.InfoLog("FileManager", "Saving file: " + path);
        return path;
    }


 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:

public static string OpenSingleFile(string extension)
    {
        string path = FileBrowser.OpenSingleFile("Open File", "", extension);

        HistoLogger.InfoLog("FileManager", "Opening file: " + path);
        return path;
    }

Am I doing something wrong?
Thank you

[Edit] I’m using Unity 2017.4.2f2 and File Browser v1.2.2

Hi

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.

I’m used to this GitHub - gkngkc/UnityStandaloneFileBrowser: A native file browser for unity standalone platforms but it’s nice to have a another option.

2 Likes

Aaah ok my mistake I thought the method was creating a new file.
Thank you for answering

1 Like