unity-named-pipes icon indicating copy to clipboard operation
unity-named-pipes copied to clipboard

System.DLLNotFoundException: NativeNamedPipe on MaxOSX

Open kolombet opened this issue 6 years ago • 5 comments

I have problem using this plugin with unity. After compilation of the game, there are no plugin (NativeNamedPipe.so) in /Contents/Frameworks/MonoEmbedRuntime/osx/ directory. Plugin code in unity in /Assets/Plugins/x86_64 directory. So on launch, game crushed with System.DLLNotFoundException: NativeNamedPipe error. "Fallback handler could not load library". Because library is just missing.

kolombet avatar May 07 '19 09:05 kolombet

Maybe I need to copy .so file manually to build?

kolombet avatar May 07 '19 09:05 kolombet

You may need to do that. I must admit, I havn't tried building this on Unity for MacOS yet. I havn't fully tested my library for MacOS at all.

Try including it with the build of the and see if that works. Make sure you include the correct version for the architecture of the system. So for the folder you put it in, make sure its the 64bit build (which I think is default from the AppVoyer)

Can I grab the version of Unity you are using too? Different versions of unity can handle native dll differently.

Lachee avatar May 07 '19 22:05 Lachee

I've tried to copy libs to build, no luck. Native plugins are turned on for the platform for sure. On windows plugin working flawlessly. Same error as in build, happens in editor using plugin on mac os x:

Calling line ptr = Native.CreateClient();

System.DllNotFoundException: NativeNamedPipe
  at at (wrapper managed-to-native) Lachee.IO.NamedPipeClientStreamPlugin/Native:CreateClient ()
  at Lachee.IO.NamedPipeClientStreamPlugin..ctor (System.String server, System.String pipeName) [0x00008] in /Users/test/game/Assets/Core/Plugins/NamedPipeClient/IO/NamedPipeClientStreamPlugin.cs:59
  at at (wrapper remoting-invoke-with-check) Lachee.IO.NamedPipeClientStreamPlugin:.ctor (string,string)
  at Plugins.PipeThread.ConnectNamedPipe () [0x00021] in /Users/test/game/Assets/Core/Plugins/Pipe/PipeThread.cs:93
  at Plugins.PipeThread.Listen () [0x00002] in /Users/test/game/Assets/Core/Plugins/Pipe/PipeThread.cs:158

kolombet avatar May 08 '19 06:05 kolombet

Unity version - 2018.2.15f1, MacOs Sierra 10.12.6 I belive problem not in unity version. It's something wrong with native part build. I couldn't fix it myself, don't have enough expertise in OSX native coding

kolombet avatar May 08 '19 06:05 kolombet

The plugin included for Unix is a .so file but Unity requires a .bundle file for Mac OS:

For cross platform plug-ins you must include the .bundle (for Mac), .dll (for Windows), and .so (for Linux) files in the Plugins folder. No further work is then required on your side - Unity automatically picks the right plug-in for the target platform and includes it with the player.

I don't need a Mac build bad enough to create a bundle right now, just leaving this here for anyone else that runs into the issue.

jelling avatar May 10 '21 18:05 jelling