Use the native File Browsers
on Mac & Windows!

Features
– Open File Panel / Open Multiple Files Panel,
– Open Folder Panel / Open Multiple Folders Panel,
– Save File Panel,
– Define a starting directory,
– Define the file extensions to be used,
– Clean and documented C# code,
– Rich demo scene,
– Works with any configuration :
— Scripting backend: Mono or IL2CPP
— Scripting runtime: .NET 3.5 or .NET 4.x
— Api Compatibility Level (for .NET 4.x): .NET Standard 2.0 or .NET 4.x
— Api Compatibility Level (for .NET 3.5): .NET 2.0 or .NET 2.0 Subset

Screenshots

Screenshot1

Testimonials

Works Perfectly
Great Asset

Callme_V

Does what is says
Easy to use, and the native browser is truly native without some additional weird looks or behavior that plagues many of the other file browser assets. I especially enjoyed being able to pick a directory, without having to use that terrible outdated WINFORMS version. Good job!

TOES

Easy to integrate, works seamlessly
I’ve tried a few different file browsers and this, while being the most expensive, is easily the best. It’s quick, easy, and there is no training for the user. They’ve all used their native file browser before, so its ready to go!

Slock20969

Does exactly what I needed
This does exactly what I needed and it’s super easy to use. My only minor complaint is that it seems a little pricey just to bridge some native Windows API calls, but was still worth it for the time savings.

akasurreal

Introduction

Native File Browser provides an easy way to use the native File Browser on Mac and Windows.
You just call a static methods from the FileBrowser class, and it will display the file browser window for you, giving you a callback for when a file/folder is selected.

You can use the FileBrowser wrapper class if you’re developing for both Mac and Windows, this will automatically call the correct platform methods.
So, using FileBrowser.OpenFilePanel will automatically call:
FileBrowserMac.OpenFilePanel on Mac
FileBrowserWindows.OpenFilePanel on Windows
With that, you don’t have to take care of checking the current platform with Application.platform.

But if you want, you can use the FileBrowserMac and FileBrowserWindows classes and not use the FileBrowser wrapper class.
There’s some small differences between each platform (for example, only Windows allow to define a title), so when calling FileBrowser.OpenFilePanel(title), the title will only be used on Windows.
That’s why the FileBrowserMac.OpenFilePanel does not have a title parameter.

Requirements

– Unity >= 5.6.0
– Building for Windows 64 bits
– Building for OSX 64 bits
(If you need a 32 bits version, please contact me)

Open File Panel

Opens the select file panel (Select a single file).
Will only allow to select files with extension defined in extensionArray.

Parameters:
title: Title (Only available on Windows).
startingDirectory: Starting directory (if null, will use the last opened folder).
extensionArray: Extension array (specify only the extension, no symbols (,.*) – example “jpg”, “png”). If null, it will allow any file.
onDone: Callback called when a file has been selected (It has two parameters. First (bool) to check if the panel has been canceled. Second (string) is the file selected).

Open Multiple Files Panel

Opens the select multiple files panel (Select multiple files).
Will only show files with extension defined in extensionArray.

Parameters:
title: Title (Only available on Windows).
startingDirectory: Starting directory (if null, will use the last opened folder).
extensionArray: Extension array (specify only the extension, no symbols (,.*) – example “jpg”, “png”). If null, it will allow any file.
onDone: Callback called when files have been selected (It has two parameters. First (bool) to
check if the panel has been canceled. Second (string[]) is the file selected array).

Open Folder Panel

Opens the select folder panel (Select a single folder).

Parameters:
title: Title (Only available on Windows).
startingDirectory: Starting directory (if null, will use the last opened folder).
onDone: Callback called when a folder has been selected (It has two parameters. First (bool) to check if the panel has been canceled. Second (string) is the folder selected).

Open Multiple Folders Panel

Opens the select multiple folders panel (Select multiple folders).

Parameters:
title: Title (Only available on Windows).
startingDirectory: Starting directory (if null, will use the last opened folder).
onDone: Callback called when folders have been selected (It has two parameters. First (bool) to check if the panel has been canceled. Second (string[]) is the folder selected array).

Save File Panel

Opens the save file panel (Save a file).
Will set the file type dropdown with the extension defined in extension, if not null.

Parameters:
title: Title (Only available on Windows).
message: A hint message on top of the panel, to display a hint to users (Only available on Mac).
startingDirectory: Starting directory (if null, will use the last opened folder).
defaultName: Default Name of the file to be saved. (If null, no name is pre-filled in the inputField).
extension: Extension (specify only the extension, no symbols (,.*) – example “jpg”, “png”). If null, it will allow any file.
onDone: Callback called when a file has been selected (It has two parameters. First (bool) to check if the panel has been canceled. Second (string) is the file selected).

How to update Native File Browser

1. Delete everything under the ‘FileBrowser’ folder from the Project View
2. Import the latest version

Version 2.0.0 - July 31, 2019

  • NEW: NativeFileBrowser now correctly works with every settings on Windows :
    • Scripting backend: Mono or IL2CPP
    • Scripting runtime: .NET 3.5 or .NET 4.x
    • Api Compatibility Level (for .NET 4.x): .NET Standard 2.0 or .NET 4.x
    • Api Compatibility Level (for .NET 3.5): .NET 2.0 or .NET 2.0 Subset
  • FIX: Multiple folder select is fixed

Version 1.0.8 - July 9, 2018

  • NEW: Compatible with Unity 2017 and Unity 2018,
  • NEW: Removed the use of a .exe file for Windows, everything is now under a single DLL,
  • NEW: Added support for 32/64 bits for both Windows/OSX. There is a FileBrowserConfigurator script that will configure the DLLs (Windows) and bundles (OS X) to the correct Platform Settings. So when you build for Windows 64 bits, only the 64 bits version of the DLL will be included in your build,
  • NEW: Added more demos to show multiple uses of the file browser,
  • UPDATE: Removed the use of the NativeFileBrowserDispatcher that is now useless,

Version 1.0.7 - April 20, 2017

  • NEW: Fixed issue when throwing an exception in the callback method on OS X,
  • NEW: The filePath returned when cancel is clicked is now null (previously it was “cancel”).

Version 1.0.6 - March 27, 2017

  • NEW: Added #define NATIVE_FILE_BROWSER in case you need to use this with scripting define symbol,
  • NEW: A dispatcher is now automatically included and use to “push” results to the main thread.

Version 1.0.5 - December 11, 2016

  • NEW: Windows: Having multiple extensions is now displayed under a single dropdown (instead of multiples).

Version 1.0.4 - September 29, 2016

  • NEW: Added possibility to define the button name on Mac (not easily possible on Windows).

Version 1.0.3 - September 9, 2016

  • FIX: Windows: Fixed issue happening when a LOT of files were selected.

Version 1.0.2 - August 10, 2016

  • FIX: Windows: Fix startingDirectory not working if the path contained / instead of \. You can now safely use paths with either / or \.
  • FIX: Windows: Fixed possible issue because result return was not Trim(),
  • NEW: Added FAQ “Why are you using a .exe file on Windows?”.

Version 1.0.1 - August 5, 2016

  • FIX: Fixed Native File Browser not working when building with architecture x86 on Mac. It now works with any architecture (Universal, x86 and x64),
  • NEW: The FileBrowser on Mac now always display the “Create folder” button.

Version 1.0.0 - July 26, 2016

  • Initial release.

Support

FAQ

What platforms are supported?

Only Mac 64 bits and Windows 64 bits standalone platforms are supported.

I want to run my game in fullscreen mode, but the NativeFileBrowser window minimize the game?

Just go to Edit -> Project Settings -> Player Settings, and under Resolution and Presentation, set the “Visible In Background” toggle to true.

How can I help?

Thank you! You can take a few seconds and rate the tool in the Asset Store and leave a nice comment, that would help a lot 😉

What's the minimum Unity version required?

Native File Browser will work starting with Unity 5.6.0.