Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangokce-infosfer committed Sep 20, 2017
2 parents e9dcbc2 + 9497cbd commit e7890e7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 3 deletions.
Binary file removed Images/sfb_icon.png
Binary file not shown.
Binary file removed Images/sfb_large.png
Binary file not shown.
Binary file removed Images/sfb_small.png
Binary file not shown.
Binary file added Images/win_import_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/win_import_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 2017.1.0f3
m_EditorVersion: 2017.1.1f1
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ A simple wrapper for native file dialogs on Windows/Mac.
- Open file/folder, save file dialogs supported.
- Multiple file selection.
- File extension filter.
- Windows version requires .NET 2.0 api compatibility level
- Linux is not supported.
- Basic WebGL support.

Expand All @@ -16,6 +15,9 @@ Example usage:
// Open file
var paths = StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false);

// Open file async
StandaloneFileBrowser.OpenFilePanelAsync("Open File", "", "", false, (string[] paths) => { });

// Open file with filter
var extensions = new [] {
new ExtensionFilter("Image Files", "png", "jpg", "jpeg" ),
Expand All @@ -27,21 +29,34 @@ var paths = StandaloneFileBrowser.OpenFilePanel("Open File", "", extensions, tru
// Save file
var path = StandaloneFileBrowser.SaveFilePanel("Save File", "", "", "");

// Save file async
StandaloneFileBrowser.SaveFilePanelAsync("Save File", "", "", "", (string path) => { });

// Save file with filter
var extensionList = new [] {
new ExtensionFilter("Binary", "bin"),
new ExtensionFilter("Text", "txt"),
};
var path = StandaloneFileBrowser.SaveFilePanel("Save File", "", "MySaveFile", extensionList);
```
Look for Sample/BasicSampleScene.unity for more detailed examples.
Look Sample/BasicSampleScene.unity for more detailed examples.

Mac Screenshot
![Alt text](/Images/sfb_mac.jpg?raw=true "Mac")

Windows Screenshot
![Alt text](/Images/sfb_win.jpg?raw=true "Win")

Notes:
- Windows
* Requires .NET 2.0 api compatibility level
* Plugin import settings should be like this;

![Alt text](/Images/win_import_1.jpg?raw=true "Plugin Import Ookii") ![Alt text](/Images/win_import_2.jpg?raw=true "Plugin Import System.Forms")

- Mac
* Sync calls are throws an exception at development build after native panel loses and gains focus. Use async calls to avoid this.

WebGL:
- Basic upload/download file support.
- Not well tested, probably not much reliable.
Expand Down

0 comments on commit e7890e7

Please sign in to comment.