gkngkc / UnityStandaloneFileBrowser

A native file browser for unity standalone platforms
MIT License
2.01k stars 317 forks source link

Does this package support .NET 4.x? #60

Open virgiegv opened 5 years ago

virgiegv commented 5 years ago

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.

jusforfun commented 5 years ago

@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)

tlskillman commented 5 years ago

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-

Jaimi commented 5 years ago

@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".

WhizzyDev commented 4 years ago

Made it work in 2019.1.6F1 with the settings thank u

slococo commented 2 years ago

@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.