Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

File Browser - Native file browser

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

  1. musicdeveloper

    musicdeveloper

    Joined:
    Oct 16, 2019
    Posts:
    46
    - Yes, I have enabled "Intel" and "Apple Silicon" on the library.

    - It does not seem that the M1 Bundle works on Intel, as per my previous post. Are you able to successfully use the M1 extracted Bundle in a build running on your Intel Mac without errors?
     
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    I can't verify it right now since I'm on holiday until the end of the week, but I will test it asap when I'm back.
    Meanwhile, you could try to build the library from the souce code.
     
  3. musicdeveloper

    musicdeveloper

    Joined:
    Oct 16, 2019
    Posts:
    46
    No worries - I very much understand about being on holiday.

    The solution I'm using for the moment is use the original .bundle file, and build only for Intel, meaning the M1 users are using the build through Rosetta.
    The users have said this is working for them now (I don't have an M1 Mac yet either).
    I imagine they are taking a performance hit, but at least they aren't leaving 1 star reviews for the moment.


    1. On your return, I would appreciate it very much if you can think a bit more about whether the way you currently have it setup for Mac builds is sufficient for how developers need to submit to the App Store. Developers can only submit one build to App Store Connect for all architectures, so I'm not sure if the current setup of extracting and replacing the .bundle file depending on architecture is suited to the fact that one universal binary build needs to work for both architectures.

    2. If I'm wrong, and you were intending for the zipped M1 .bundle file to work on both Intel and Apple Silicon already, it does not seem to be working on Intel at this time, and you should be able to test this issue by making an Intel build with the unzipped M1 .bundle file, on your existing Intel Mac on your return.

    Thank you, and enjoy your holiday
     
    Stefan-Laubenberger likes this.
  4. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Thank you!
    I will try to build an bundle that works on all platforms, that's the ultimate goal :)
     
  5. Ayrizale

    Ayrizale

    Joined:
    Apr 16, 2021
    Posts:
    3
    Hello,

    I'm having some trouble with SaveFile(). Here's the code that I've got:

    Code (CSharp):
    1.     public void OnExportButtonPressed()
    2.     {
    3.         string path = FileBrowser.Instance.SaveFile("Export Database", "", "My_Database", "*");
    4.  
    5.         if (path.Length != 0)
    6.         {
    7.             string sourcePath = Application.persistentDataPath + "/My_Database";
    8.             System.IO.File.Copy(sourcePath, path, true);
    9.         }
    10.     }
    This works fine in the Editor, it copies the file just as I would expect it to.

    But when I build the application and try to export the file, the SaveFile Dialog shows a *.* in the filename line and if I enter the name of a file that doesn't already exist in the folder, it says that the "File name is not valid".

    Thanks in advance for any help.
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Hi Ayrizale

    Yes, you're right - "*" alone won't work. Please specify at least one extension, like:
    Code (CSharp):
    1. string path = FileBrowser.Instance.SaveFile("Export Database", "", "My_Database", "db", "*");

    Cheers
    Stefan
     
  7. Ayrizale

    Ayrizale

    Joined:
    Apr 16, 2021
    Posts:
    3

    Worked perfectly, thank you.
     
    Stefan-Laubenberger likes this.
  8. Archtica

    Archtica

    Joined:
    Mar 23, 2018
    Posts:
    14
    Hi Stefan, first of all thank you for a great product.
    With the new update I get the following error building for UWP:

    Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(56,69): error CS0507: 'FileBrowserWSA.CurrentOpenSingleFile.set': cannot change access modifiers when overriding 'public' inherited member 'BaseFileBrowser.CurrentOpenSingleFile.set'

    Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(57,66): error CS0507: 'FileBrowserWSA.CurrentOpenFiles.set': cannot change access modifiers when overriding 'public' inherited member 'BaseFileBrowser.CurrentOpenFiles.set'

    Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(58,71): error CS0507: 'FileBrowserWSA.CurrentOpenSingleFolder.set': cannot change access modifiers when overriding 'public' inherited member 'BaseFileBrowser.CurrentOpenSingleFolder.set'

    Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(59,68): error CS0507: 'FileBrowserWSA.CurrentOpenFolders.set': cannot change access modifiers when overriding 'public' inherited member 'BaseFileBrowser.CurrentOpenFolders.set'

    Assets\Plugins\crosstales\FileBrowser\Scripts\Wrapper\FileBrowserWSA.cs(60,63): error CS0507: 'FileBrowserWSA.CurrentSaveFile.set': cannot change access modifiers when overriding 'public' inherited member 'BaseFileBrowser.CurrentSaveFile.set'
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Please send me your invoice via email and I will provide you with a fix.
     
  10. Archtica

    Archtica

    Joined:
    Mar 23, 2018
    Posts:
    14
    Sent
     
  11. megavoid-de

    megavoid-de

    Joined:
    Sep 29, 2020
    Posts:
    5
    Hi all,

    We are doing the same for our test builds right now. Building Intel only works quite well on M1 Macs as well but is no sustainable solution in the long run as Rosetta2 is just intended as a bridge technology that will be discontinued more sooner than later.

    The M1 bundle does not work in Universal builds on our Intel Macs. The App will give a beachball of death and slow down the whole system to 2-3 seconds per frame the moment a File Browser Pro window is opened.
     
  12. Stefan-Laubenberger

    Stefan-Laubenberger

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

    We're working on an Universal-library and hope to release it until the end of the month.
    Meanwhile, it's always possible to rebuild the bundle with the source code in Xcode.


    Cheers
    Stefan
     
    megavoid-de likes this.
  13. Nesit

    Nesit

    Joined:
    Dec 24, 2019
    Posts:
    6
    Hi,

    We are using your plugin for Universal Windows Platform. It works pretty much as expected, no problems at all. However, Windows Store moderation team rejects our application for the following reason:

    "More information is required to review your request for using restricted capabilities:
    broadFileSystemAccess

    Please provide us with specific reasons why the FilePicker/FolderPicker/FutureAccessList APIs do not meet your needs."

    As I understand, application requests unnecessary permissions because of "broadFileSystemAccess" capability, and moderation requests us to use "FilePicker/FolderPicker/FutureAccessList APIs" instead, or explain, why it isn't possible. The code we use:


    Code (CSharp):
    1. var extensions = new[] { new Crosstales.FB.ExtensionFilter("Image Files", "png", "jpg", "jpeg") };
    2. var paths = FileBrowser.Instance.OpenFiles("Open File", "", "", extensions);


    Any idea, how to fix it? Thanks in advance!
     
  14. Stefan-Laubenberger

    Stefan-Laubenberger

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

    As it seems, there are only two possibilities:
    1. Remove the capabilitiy "broadFileSystemAccess". This will allow only "safe" path destinations allowed by MS
    2. Try to explain the reviewer why full file system access is mandatory
    I hope this helps you further.


    Cheers
    Stefan
     
  15. MrPeperoni

    MrPeperoni

    Joined:
    Oct 9, 2018
    Posts:
    4
    Hey Stefan,

    thank you very much for this great asset and your great support.
    I downloaded your asset and it works so far very well. I only have one problem what I'm not really unterstand and I hope you can help me with it.

    First my sepcs:
    Unity 2020.1.17f
    Windows 10
    Filebrowser Pro 2021.2.5

    My example:
    Code (CSharp):
    1. // async version
    2. FileBrowser.Instance.OpenFilesAsync(SetPathToLoad, false, "json");
    3.  
    4. // sync version
    5. SetPathToLoad(FileBrowser.Instance.OpenSingleFile("json"));
    My problem:
    I simply wanna save and load a json-file with my configurations. And mostly it works without any problems but from time to time (and currently I don't now when it get triggered) my whole unity editor freeze when I want to open the fileBrowser and then I have to restart everything.
    Do you have maybe an idea what the reason for this could be? Is it wrong that I use FileBrowser.Instance?

    I hope you can help me.

    Sincerly
    Alex
     
  16. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Hi Alex

    Thank you very much for investing into our asset!

    I don't know why this is happening :(
    Have you enabled or disabled "Native Inside Editor"?
    upload_2021-7-19_15-16-42.png


    So long,
    Stefan
     
  17. MrPeperoni

    MrPeperoni

    Joined:
    Oct 9, 2018
    Posts:
    4
    My "Native Inside Editor" was disabled. I enabled it now and will check it out if it changes something.
    Maybe this is the answer. I will let you know.
     
    Last edited: Jul 20, 2021
  18. MrPeperoni

    MrPeperoni

    Joined:
    Oct 9, 2018
    Posts:
    4
    Ok, I enabled "Native Inside Editor" and now the save editor doesn't open anymore. Loading still works like before but when I want to save something then the method (FileBrowser.Instance.SaveFile("save_"+DateTime.Now.ToString("dd-MM-yyyy_HH:mm"),"json")
    is called but no window will open and it only returns Null.

    With a disabled "Native Inside Editor" then saving works normaly. What's the difference?
     
  19. Stefan-Laubenberger

    Stefan-Laubenberger

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

    The problem is the colon ":" in the format string. It should look like that: dd-MM-yyyy_HH_mm
    Anyway, the next update will print a warning in the console.


    Cheers
    Stefan
     
    MrPeperoni likes this.
  20. tammudo

    tammudo

    Joined:
    Oct 2, 2017
    Posts:
    4
    Hi Stefan. I am a junior dev from Volta. I've been trying to get ShowFolder() to work in Mac and WIN Builds as it only works in editor for both platforms. I keep getting this in Mac Builds: tid_303 (1): EXC_BAD_ACCESS (code=1, address=0x0) and I get this "the application can't be opened -50" pop up. On WIN builds, I keep getting this "Could not show file location. System.ComponentModel. Win32Exception (0x80004005): mono-io-layer (0)" in my dev build console. I'm wondering if you would know what I'm missing? I've also tried editing my saved path string to use forward slashes, back slashes, and no slashes with various results, but all of which did not help make ShowFolder work in builds. Thank you!
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Please send me your invoice via email and I will give you access to an updated package.


    Cheers
    Stefan
     
  22. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    15
    Hi FB-Team,

    we have a wierd problem with file extensions and linux when saving a file.
    The problem:
    When we use SaveFile() in a linux build the extension (.txt) is missing in the end of the filename and the file saves without the extension.
    In an other file we have a double extensions (.tar.bz2) and the second one is missing.

    But in the Unity Editor under the same linux pc the extensions are there.

    We use
    Code (CSharp):
    1. new ExtensionFilter("Text", ".txt")
    It seems like that somehow in the build FB cuts the last extension. :eek:
    Any ideas?

    Greets Marco :)

    Unity Verison: 2019.4.4.f1
    Ubuntu 20.04 LTS
    FB Version 2020.4.1 Pro
     
  23. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Hi Marco

    Hmm, I'm not sure about the problem atm... :(
    Can you please comment line 207 ("if (Util.Config.DEBUG)") in "FileBrowserLinux.cs" and create and run the build?
    What is the result in the application log?


    So long,
    Stefan
     
  24. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    15
    Hi Stefan,

    I updated FB to the newest version (2021.2.5) and did what you suggested.

    My Results in the player.log is:
    Code (CSharp):
    1. getFilterFromFileExtensionList: Text;txt
    2. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
    3.  
    4. getFilterFromFileExtensionList: Archive;bz2
    5. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
    But it still does not work in the build.

    Greets,
    Marco
     
  25. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Thanks for testing it!

    What happens if you add an additional extension, e.g. "csv", to your "Text" extension type?
    Does it just ignore the last extension for any given extension type?
    What's the result then in the player.log with multiple extensions?
     
  26. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    15
    The Result is
    Code (CSharp):
    1. getFilterFromFileExtensionList: Text;txt,csv
    All given extensions are shown in the log.
    But still not in the file window.

    Screenshot from 2021-07-28 15-10-28.png

    Thanks for your help.
     
  27. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Unfortunately I have to ask again to understand the problem: are neither files of the type "txt" nor "csv" shown or is only "csv"-missing?
    Would you mind do the same test for "OpenFile"? Does it behave the same?
    I'm currently on holiday and have no Linux-machine available :(
     
  28. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    15
    Hi,
    no problem :)

    When the "Save File" Window opens, then the file extension is missing in the file name field.
    Also when multiple extensions are given, only the first one can be selected in the file type dropdown. See image.
    Screenshot from 2021-07-28 15-10-28.png
    The problem is, when the user hits the save button, the file will be saved without an extension. This causes a problem when the user later trys to open the file again. He can't find it and our software does validate the file type.

    However this behavior is only in the build not in the editor.o_O

    Opening files works fine. I can see all files with the given extensions.

    Have a nice holiday :cool:
     
  29. Immotion_Tech

    Immotion_Tech

    Joined:
    Apr 11, 2018
    Posts:
    1
    Hello!
    First time using FileBrowserPro for Mac (long time FileBrowser user) - am getting DllNotFoundException: FileBrowser in build (Development Build). Am working on M1 and have swapped the FileBrowser bundle as directed - any help?
     
  30. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    Can you please send us your invoice via email?
     
  31. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    15
    Hi,
    any updates on the file extansion problem?

    Greets
     
  32. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Please send us your invoice via email and we can give you access to the latest build.


    Cheers
    Stefan
     
  33. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,720
    We've just released version 2021.3.2 of File Browser.
    Main changes:
    • Code cleanup
    • Updated to Common 2021.3.1
     
    megavoid-de likes this.
unityunity