UnityStandaloneFileBrowser icon indicating copy to clipboard operation
UnityStandaloneFileBrowser copied to clipboard

Unity 2017 support

Open Aleana27 opened this issue 8 years ago • 7 comments

Unity version: Unity_2017.1.0f3

Hallo, I integrated the UnityStandaloneFileBrowser with the Unity version 5.5.1f1 to build an application for MacOS. The file browser was working perfectly fine in the Unity editor and in the app. Thank you for your amazing work.

But now I need to update to the new Unity 2017 version. When I tried to open the FileBrowser in the Editor (and in the app) I get the following message: Couldn’t open Assets/Plugins/StandaloneFileBrowser.bundle/Contents/MacOS/StandaloneFileBrowser, error: dlopen(Assets/Plugins/StandaloneFileBrowser.bundle/Contents/MacOS/StandaloneFileBrowser, 2): Library not loaded: @executable_path/…/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib

Apparently Unity changed the folder @executable_path/../Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib to @executable_path/../Frameworks/Mono/MonoEmbedRuntime/osx/libmono.0.dylib which is causing a linking issue as described here: https://github.com/gree/unity-webview/issues/219#issuecomment-315760749 

I managed that the plugin can access the library so that the file browser opens. But as soon as I click on Cancel or Open in the file browser, Unity crashes. The same is happening for the actual application.

Do you know how to fix this issue?

Greetings, Aleana27

Aleana27 avatar Aug 22 '17 11:08 Aleana27

I too just ran into this. Any workarounds?

XPav avatar Sep 15 '17 18:09 XPav

Hi,

This error was occurring on async branch. I moved async calls to master and converted "UnitySendMessage" implementation to a simple callback.

Now, if you can use the package from master branch, async calls should work on both Unity 2017 and Unity 5

gkngkc avatar Sep 19 '17 05:09 gkngkc

I've also noticed that passing a null string in any of the parameters will cause the hard crash on Mac.

XPav avatar Sep 19 '17 21:09 XPav

@XPav Ok thanks, I added null checks to mac plugin code.

gkngkc avatar Sep 20 '17 18:09 gkngkc

Thanks for your project. It works perfectly !

liumingzw avatar Nov 02 '17 07:11 liumingzw

I tried to make a build of the test scene and it throws this error

ArgumentException: The Assembly System.Drawing is referenced by System.Windows.Forms ('Assets/Plugins/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:142) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:148) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:148) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:179) UnityEditor.HostView:OnGUI()

Im using unity 5.6.3p1 and when I try to run the build .exe an error message pops out saying There should be 'fileBrowserTestBuild_Data' folder next to the executable

smart09091 avatar Apr 11 '18 03:04 smart09091

Player Settings/Api Compatibility Level should be .NET 2.0. Doesn't work with Subset. Also check the plugin import settings, sometimes unity removes non core .NET dll's.

You can look this and this.

gkngkc avatar Apr 11 '18 06:04 gkngkc