Unity Player looks for plugin file in wrong place on Linux

I compiled a plugin for 64 bit Linux and put in in Assets/Plugins/x86_64, but I get a DllNotFoundException.

I build my game for Linux and put it in /home/myhome/testGame.

The player log says:

Fallback handler could not load library /home/myhome/testGame_Data/Mono/x86_64/.//home/myhome/testGame_Data/Plugins/x86_64/libUnityInterface.so
Fallback handler could not load library /home/myhome/testGame_Data/Mono/x86_64/lib/home/myhome/testGame_Data/Plugins/x86_64/libUnityInterface.so
Fallback handler could not load library /home/myhome/testGame_Data/Mono/x86_64/./lib/home/myhome/testGame_Data/Plugins/x86_64/libUnityInterface.so

But, instead, shouldn’t it be looking in /home/myhome/testGame_Data/Mono/x86_64/Plugins/x86_64?

It seems that the player is looking for the .so file in the wrong place. Is there a way I can fix that?

It should be in the /home/myhome/testGame_Data/Plugins/x86_64, at least for my build.

Does it only happen in Linux? I haven’t tested it on other platforms.

For now you need to copy the .so to the Mono/x86_64 folder.