Acobs File Browser
A file browser for your Unity projects!
Works out of the box by using a prefab and making a function call, or can be customized and integrated into your game menus.
Features
- The main file browser API supports common features of a file browser:
- Browse the file system
- Rename
- Move
- Copy
- Delete
- Filter files/directories
- Pre-defined and user-defined schortcuts to quickly access directories
- The file browser is customizable:
- The default UI can be easily customized with themes
- File browser API and UI are fully seperated, i.e., the provided UI can be extended or replaced with a custom UI
- Fine grained options to control how the file browser behaves and to limit what the user can do, e.g., disable the ability to delete files
- Pre-made basic file browser:
- File Browser API + UI to be used out of the box
- Can be used to pick files to open or save to
- Available as an "overlay file browser" displayed accross the whole screen or can be placed on a canvas in the scene
- Android specific features:
- Permission handling on Android
- Android Storage Access Framework support
- Support to intercept native dialogs (like permission requests) to, e.g., not unexpectedly end a VR/XR experience
Supported Platforms
- Windows
- Android (including support for Android Storage Access Framework)
Quick Start
After importing the package, the file browser can be set up in two simple steps:
Navigate to PremadeFileBrowsers/OverlayFileBrowser. Choose e.g. the OverlayFileBrowserLandscape prefab and drag it into the scene.
To open the file browser, call OverlayFileBrowser.Instance.Open method as shown below. Provide the onFinished callback to get the files that the user has picked.
Check out the the Demo scene for a working example.
public void Example(){
OverlayFileBrowser.Instance.Open(
mode:BasicFileBrowser.BasicFileBrowserMode.Read,
pickMode:BasicFileBrowser.BasicFileBrowserPickMode.Files,
onFinished:OnFinished,
onCanceled:OnCanceled
);
}
private void OnFinished(BasicFileBrowser.BasicFileBrowserResult[] result){
string pickedFiles = "";
for(int i = 0; i < result.Length; i++){
pickedFiles += result[i].path + "\n";
}
Debug.Log("File Browser: Picked the following files: " + "\n" + pickedFiles);
}
private void OnCanceled(){
Debug.Log("File Browser closed");
}
Support
If you have a question or found a bug please write to