Search Unity

File Browser - Native file browser

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, Dec 28, 2017.

  1. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    It's still in the review process, but it should be available in the next few days.


    Edit:
    FB PRO is in the store!
     
    Last edited: Apr 18, 2019
    AlanMattano likes this.
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We've just released version 2019.1.2 of File Browser.
    Main changes:
    • Editor integration added
    • Set API level for Unity 2018+ fixed
    • Minor code improvements
    • Documentation improved

    The Editor integration looks like this:
    Editor-Configuration.PNG
    Editor-Help.PNG
    Editor-About.PNG

    Enjoy!
     
    AlanMattano likes this.
  3. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    What is your current version of FB? If you use 2019.1.2 you shouldn't set the API level manually - we added a script that should take care of that... Which is your Unity version?

    About the build warning: this is harmless and the build will complete successfully and there is no impact on the application.
    What bothers me is your second problem - I tried it on my side but everything works, even when I open the save panel like this:
    Code (CSharp):
    1. string path = FileBrowser.SaveFile(null, null, null, "");
    How do you "provoke" the error?


    Cheers
    Stefan
     
  4. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,277
    Sorry Stefan, getting my file browsers mixed up. Perhaps I should use yours - "Native File Browser" is the one with issues! It's confusing because the API is named the same in both
     
    Stefan-Laubenberger likes this.
  5. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    The link is not ready in the browser.
    But if you open Unity and go to AssetStore window, search for File Browser Pro and is there.

    Stefan, the update window pops up but I was updating Unity and I press not now. Now I'm ready to update your asset to the latest vr. I wish to use your update button but I do not find it anywhere. Maby to include it in About section if you have not done it yet?
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Alan

    The link should work, isn't it?

    Since 2019.2.1 there is a new Editor integration with an "About"-tab. There should be everything you are looking for:
    upload_2019-2-1_10-6-17.png

    I hope this is what you meant.


    Cheers
    Stefan
     
    AlanMattano likes this.
  7. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    YES, perfect!

    Was hard for me to update from 2019.1.1 to 2019.1.2 probably because, before importing the asset, I use to delete FileBroser folder. And my script pointing using Crosstales.FB; triggering errors that probably block the import process. FileBrowser.unitypackage did not unpack automatically. I was able to unpack it manually, importing it as a custom package.

    Now that there is this [Upgrade] button, it will be faster since the Unity asset store is very slow these days. Thanks a lot for this tool!
     
    Last edited: Feb 1, 2019
    Stefan-Laubenberger likes this.
  8. jd_terry

    jd_terry

    Joined:
    Sep 20, 2018
    Posts:
    1
    Hi
    If you open the FileBrowser using OpenSingleFile (when the FB is open), Unity will stop and Unity will run after you close the FileBrowser dialog box. Is there a way to keep Unity running even when FileBrowser is running?
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi jd_terry

    Unfortunately, this is currently not possible - Unity has to wait until the file dialog is closed because it's a modal dialog.
    We're trying to find a solution but I can't promise anything.

    Cheers
    Stefan
     
    Last edited: Feb 25, 2019
  10. StarCoop

    StarCoop

    Joined:
    Nov 26, 2016
    Posts:
    44
    Hi there,

    I just noticed that multiselect is not possible in Editor! Can you explain why that is and if this is about to change in the future? It's hard to debug when you need to create the standalone everythim ^^.

    Edit: Nevermind, damn it, I just saw it - EditorUtilities. Any idea to work around that?
    Edit2: OK, so basically I just removed the defines for the FileBrowserWindows class and assigned a the Windows platform wrapper in the FileBrowser.cs.
    I assume the reason for this was to keep the Editor functionality independent of the actual platform. But, as the Editor version doesn't support multiselect, I would only check for the platform and not make a different wrapper when running in Editor.
     
    Last edited: Mar 8, 2019
  11. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    We made a new checkbox in the "Configuration" that solves the issue you mentioned:
    upload_2019-3-8_14-25-57.png

    If you want to have access to the new version, please send us an email.


    So long,
    Stefan
     
  12. davidrmsg

    davidrmsg

    Joined:
    Dec 25, 2017
    Posts:
    1
    Hi,
    Any support for il2cpp yet? I'm getting crashes when using il2cpp on Windows.

    Also I'm getting the following warning in the editor:
    System.Windows.Forms.dll assembly is referenced by user code, but is not supported on StandaloneWindows64 platform. Various failures might follow.

    It seems that FileBrowserWindows.cs references System.Windows.Forms.

    Thanks
     
  13. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    We're working on a solution for IL2CPP under Windows, but it's not supported with the actual version.

    Stay tuned!


    Cheers
    Stefan


    Edit:
    The PRO supports IL2CPP under Windows
     
    Last edited: Apr 18, 2019
  14. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    What does it mean Windows: "System.Windows.Forms.dll" removed for us as users?
    There are things we can't do any more?
    Did you convert that to C#?
    I'm a regular Windows user saving and loading files .txt or my own format extension
     
  15. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Alan

    Nothing changes for you as a user. We just removed the dll from the package since it's no longer used.
    This also saves space (the dll was around 2MB).


    Cheers
    Stefan
     
    AlanMattano likes this.
  16. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    53
    I need a file enumeration method for the code I'm writing, targeting UWP in Mixed Reality. I thought of using FileBrowser Pro to at least enumerate the files and then build a user interface (since the current FileBrowser interface does not work in Mixed Reality).

    So I'm testing my approach in normal Windows, not UWP, with the FileBrowser free, and with :

    string[] filenames;
    filenames = FileBrowser.GetFiles("s:\\deretour", false,"mp4")

    There are a dozen of files in the directory, but it returns nothing…. anything I'm doing wrong? Or maybe I'm assuming wrongly that this would work?

    Code snippets and examples would be useful in the documentation.

    Thanks!

    FG
     
  17. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    You have to add an end-delimiter to the path, like "s:\\deretour\".


    Cheers
    Stefan
     
  18. Gloryiam

    Gloryiam

    Joined:
    Oct 25, 2017
    Posts:
    6
    Hi Stefan,

    Thank you for this very useful plugin!

    I have been using it for a couple weeks now and it has been great until the last update (free version 2019.2.3). After upgrading, I can launch my native file browser in the editor just fine but it does not work in my standalone build anymore. I have not changed any code in my project since before the update. Do you know what could be causing this?

    Edit: My build is for Windows 10

    Thank you!
    Jacob
     
    Last edited: Apr 9, 2019
  19. Vic070

    Vic070

    Joined:
    Aug 6, 2016
    Posts:
    9
    Same is happening to me. I'm using Unity 2018.3.9f1.
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi Jacob

    Thank you for your report! We will investigate this.


    So long,
    Stefan
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Please give us time to find the issue.

    Btw, I know it sounds a bit cheap, but the PRO version works 100%. ;) We implemented a new way to support IL2CPP and it's extensively tested.
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We've found the build problem under Windows and released version 2019.2.4.

    @Gloryiam @Vic070
     
    Last edited: Apr 11, 2019
  23. Gloryiam

    Gloryiam

    Joined:
    Oct 25, 2017
    Posts:
    6
    Stefan-Laubenberger likes this.
  24. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Thank you very much!
     
  25. Vic070

    Vic070

    Joined:
    Aug 6, 2016
    Posts:
    9
    Stefan-Laubenberger likes this.
  26. raymondtsang_amvr

    raymondtsang_amvr

    Joined:
    Feb 26, 2019
    Posts:
    6
    Using 2018.3.6f1, build with demo scene 'ExampleSync'
    Cannot show the open dialog when clicking the button
    It works in Unity Editor
     
  27. VladimirGordeev

    VladimirGordeev

    Joined:
    May 16, 2017
    Posts:
    11
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.GameObjectInspector.ClearPreviewCache () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:201)
    UnityEditor.GameObjectInspector.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:189)
    UnityEditor.AssetDatabase:ImportPackage(String, Boolean)
    Crosstales.FB.EditorTask.ZInstaller:.cctor() (at Assets/Plugins/crosstales/FileBrowser/Editor/Task/ZInstaller.cs:25)
    UnityEditor.EditorAssemblies:processInitializeOnLoadAttributes()
     
  28. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    We never saw this exception before... :( Which Unity version are you using?
    However, please try to restart Unity. If this doesn't help, please delete "ZInstaller" and import the "FileBrowser.unitypackage" manually.


    Cheers
    Stefan
     
  29. amidofu

    amidofu

    Joined:
    Mar 1, 2016
    Posts:
    23
    Does "directory" argument in FileBrowser.OpenSingleFile work?
    I tried to pass directory like "E:/UnityProjects" but it always use the folder where I opened a file successfully last time as the root folder for the File Open Dialog.

    File Browser version: 2019.2.4
    Unity version: 2017.4.12
    OS: Windows 10 64 bit
     
  30. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Yes, we just saw this is a bug - thank you for reporting this!
    We will release a fix today.

    If you need the fix right now, send me an email.


    Cheers
    Stefan
     
    amidofu likes this.
  31. frangagn

    frangagn

    Joined:
    Sep 20, 2018
    Posts:
    53
    I just purchased FileBrowser Pro, the paid version, because I'm developing in UWP for Mixed Reality, and I'm having lots of problems with it.

    The first thing is that I need to get the directories from the root of a drive, for example S:/ or G:/ using:

    FileBrowser.GetDirectories("D:/Downloads/", true);

    or

    FileBrowser.GetDirectories("D:/Downloads/", false);


    When I do this, I get:

    Could not scan the path for directories: System.ArgumentNullException: Value cannot be null.
    Parameter name: path
    at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00003] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
    at Crosstales.Common.Util.BaseHelper.GetDirectories (System.String path, System.Boolean isRecursive) [0x00009] in C:\Users\fran_\Documents\test Filebrowser alone\Assets\Plugins\crosstales\Common\Scripts\Util\BaseHelper.cs:568
    UnityEngine.Debug:LogWarning(Object)
    Crosstales.Common.Util.BaseHelper:GetDirectories(String, Boolean) (at Assets/Plugins/crosstales/Common/Scripts/Util/BaseHelper.cs:572)
    Crosstales.FB.FileBrowser:GetDirectories(String, Boolean) (at Assets/Plugins/crosstales/FileBrowser/Scripts/FileBrowser.cs:358)
    fbtest:OpenSingleFile() (at Assets/fbtest.cs:35)
    fbtest:Awake() (at Assets/fbtest.cs:15)

    but if I specify the file path, such as "D:/downloads/" I get the list of directories within. So how can I get a list of logical drives, let alone get the directories from the root of that drive?

    Then, let's say I specify a directory like S:/deretour/ as you suggested above, using for example:

    string[] path = FileBrowser.GetFiles( "S:/deretour/", true,"*");

    I get the list of files or directories. However, when I try to BUILD it, I get multiple errors:
    "Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(66,13): error CS0200: Property or indexer 'FileBrowserWSAImpl.isBusy' cannot be assigned to -- it is read only"
    "Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(88,13): error CS0200: Property or indexer 'FileBrowserWSAImpl.isBusy' cannot be assigned to -- it is read only"
    "Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(107,13): error CS0200: Property or indexer 'FileBrowserWSAImpl.isBusy' cannot be assigned to -- it is read only"

    I'm really frustrated.... I purchased the pro version because I wanted to use it with UWP, let alone working VR, as it claims to be compatible, but how do I do this??? The documentation is very unclear about this. It does not even work in a blank application set to UWP with the code above. I've read the documentation inside out to try to find answers to this, to no avail.

    Where/how could I get help?
     
  32. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    I wrote you an email.
     
  33. wl919863201

    wl919863201

    Joined:
    Oct 8, 2018
    Posts:
    3
    Hello, stefan. First of all, thank you so much for creating it.

    It works fine on Windows, but I wanted to run my program on Linux, and I had a little problem, I used your "EaxpleScene" build and run on Linux, and when I click on any button about the file browser, my program will not respond, I checked the log, and unfortunately there is no information about this problem.

    This problem may not be caused by your work, because I also have this problem with another file browser on github, but I know little about Linux, so I would like to ask for your help.

    Thank you for any help.

    I'm sorry my English is poor.
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Please replace under "Assets/Plugins/crosstales/FileBrowser/Native/Linux" the file "libStandaloneFileBrowser.so" with the attached file and let me know if it helps.
    Btw, GTK 2+ must be installed.


    So long,
    Stefan
     

    Attached Files:

  35. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Feedback idea for all your software:
    We can read a release note and how to update after pressing the "Update" button and before the Download button.

    upload_2019-5-18_10-18-11.png
     
  36. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    How do I correctly update from 2019.2.5 to 2019.2.6?
     
  37. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    We will consider adding this feature in the future :)
     
    AlanMattano likes this.
  38. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
  39. wl919863201

    wl919863201

    Joined:
    Oct 8, 2018
    Posts:
    3
    Thank you for your reply.I did this,but it didn't work.:(By the way, do I need to release it with Unity3D for Linux?
    Or can you tell me your Linux system information?
    This is my system information:
    Ubuntu 18.04.2 LTS
    Operating system type:64
    GNOME:3.28.2
    And GTK2+ is installed.
     
    Last edited: May 20, 2019
  40. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi

    Please send me an email to help you further.
    Thank you!


    Cheers
    Stefan
     
  41. eggtart

    eggtart

    Joined:
    Feb 4, 2013
    Posts:
    46
    Is it true that if I am using Mac, I will not be able to use OpenSingleFile() inside the Editor? Thanks!
     
  42. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    No, "OpenSingleFile" works without any problems.
     
  43. eggtart

    eggtart

    Joined:
    Feb 4, 2013
    Posts:
    46
    I tried, the file dialog opens but I cannot select any file.

    P.S. After some experimenting, I found I need to put in an extension, e.g. "png", the default "*" does not work.
     
    Last edited: Jun 28, 2019
  44. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hello again

    To select any files, simply call FB like this:
    Code (CSharp):
    1. string path = FileBrowser.OpenSingleFile();
    I hope this helps.


    Cheers
    Stefan
     
  45. eggtart

    eggtart

    Joined:
    Feb 4, 2013
    Posts:
    46
    This is what I did, but I could not select any file.

    I have to specify an extension like this
    string path = FileBrowser.OpenSingleFile("png");
    then I will be able to select the png files
     
  46. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi eggtart

    FB uses the built-in file browser inside the Editor under macOS.
    We assumed that the implementation behaves the same on all platforms, but unfortunately, it's different between Windows and macOS. :(

    However, here is a fix for that - please change the method "getFilter" in "FileBrowser.cs" (starting on line 360):
    Code (CSharp):
    1. private static ExtensionFilter[] getFilter(params string[] extensions)
    2. {
    3.     if (extensions != null && extensions.Length > 0)
    4.     {
    5.         ExtensionFilter[] filter = new ExtensionFilter[extensions.Length];
    6.  
    7.         string extension;
    8.  
    9.         for (int ii = 0; ii < extensions.Length; ii++)
    10.         {
    11.             extension = string.IsNullOrEmpty(extensions[ii]) ? "*" : extensions[ii];
    12.  
    13.             if (extension.Equals("*")) {
    14.                 filter[ii] = new ExtensionFilter(Util.Constants.TEXT_ALL_FILES, Util.Helper.isMacOSEditor ? string.Empty : extension);
    15.             } else
    16.             {
    17.                 filter[ii] = new ExtensionFilter(extension, extension);
    18.             }
    19.        
    20.         }
    21.  
    22.         if (Util.Config.DEBUG)
    23.             Debug.Log("getFilter: " + filter.CTDump());
    24.  
    25.         return filter;
    26.     }
    27.  
    28.     return null;
    29. }
    Please let me know if it works for you.

    Thank you for the report!


    So long,
    Stefan
     
  47. eggtart

    eggtart

    Joined:
    Feb 4, 2013
    Posts:
    46
    It is working perfectly now. Thank you so much for providing this plugin.

    Hope this change will make it to the next update :p
     
    Stefan-Laubenberger likes this.
  48. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Thank you for your feedback!
    Sure thing, the update with the fix will be released during the next week. ;)


    All the best
    Stefan


    P.S: if you want to support us, please write a little review. Or even better, consider buying the PRO version :rolleyes:
     
  49. cricketspike

    cricketspike

    Joined:
    Apr 5, 2017
    Posts:
    9
    Hi with the newest (Pro) version when I build an executable Ive noticed my data folder is much larger, and when I looked inside it, all of my scripts are exposed and put in a folder called FBWrapper.exe, basically my entire asset folder is in there. Is this a bug? Is there a way to turn it off?
     
    Last edited: Jul 3, 2019
  50. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,981
    Hi cricketspike

    Did you follow the upgrade instructions in chapter 6 of the documentation?
    https://www.crosstales.com/media/data/assets/FileBrowser/FileBrowser-doc.pdf

    FB 2019.3.5 has no "FBWrapper.exe" so it seems to be a problem with a previous version.

    Cheers
    Stefan