UnityStandaloneFileBrowser icon indicating copy to clipboard operation
UnityStandaloneFileBrowser copied to clipboard

Does this package support .NET 4.x?

Open virgiegv opened this issue 5 years ago • 5 comments

I have been working with this package in my unity 2019 project with the .NET 3.5 framework and it all works perfectly. I needed to upgrade to .NET 4.x framework though, and after that the file browser windows will open perfectly in editor, but once I build my app it stops working. Turns out that this method call:

pathArray = StandaloneFileBrowser.OpenFilePanel("Load file", "", extensions, false);

(where extensions is an extensionfilter array) is returning only "" all the time now.

Is the OpenFilePanel implementation no longer compatible now that I changed the framework to .NET 4.x? It seems strange to me, because it still works well in editor, just not in build.

As a side note, when I upgraded to .NET 4.x framework, I had to download a couple of dlls in order to be able to build my app. One of them was the mono.webbrowser.dll and the other was mono.posix.dll, which were accessed by the SystemWindowsForms.dll, which is a plugin this package brings. Could it be related to my problem?

Thanks in advance.

virgiegv avatar May 10 '19 19:05 virgiegv

@virgiegv

Have encountered issue on my side as well after build where file panel does not even open up. Have found a workaround without the need to bring the dependencies .dll files (mono.webbrowser, mono.posix) which is to set the api compatibility level to .Net 4.x under player settings if this helps.

(using Unity 2019.1.0f2)

jusforfun avatar May 14 '19 02:05 jusforfun

Unfortunately, this breaks my Photon Engine asset.... blah... -whine on- so many tools, so many interdependencies... blah. It's hard to create new content when the old keeps breaking. -whine off-

tlskillman avatar May 14 '19 18:05 tlskillman

@virgiegv

Have encountered issue on my side as well after build where file panel does not even open up. Have found a workaround without the need to bring the dependencies .dll files (mono.webbrowser, mono.posix) which is to set the api compatibility level to .Net 4.x under player settings if this helps.

(using Unity 2019.1.0f2)

Using Unity 2019.1.5f2, I'm not able to get it to work with the same settings - Scripting Runtime Version ".Net 4.X equivalent", and Compatibilitiy level set to ".Net 4.x".

Jaimi avatar Jun 11 '19 14:06 Jaimi

Made it work in 2019.1.6F1 with the settings thank u

WhizzyDev avatar Aug 05 '19 09:08 WhizzyDev

@virgiegv

Have encountered issue on my side as well after build where file panel does not even open up. Have found a workaround without the need to bring the dependencies .dll files (mono.webbrowser, mono.posix) which is to set the api compatibility level to .Net 4.x under player settings if this helps.

(using Unity 2019.1.0f2)

TY! That worked like a charm.

slococo avatar Dec 03 '21 19:12 slococo