Has anyone had any success getting Unity to load Steamworks.NET properly? On windows I could put the csteamworks into the plugin folder and steamapi in the project root and it works in the editor, but I’ve not managed to get it to work on linux yet. As in, putting libCSteamworks.so in Assets/Plugins/x86_64/ folder and marking it as linux x86_x64 and trying to load up the steam api results in a DLL not found error.
The issue here is with the system library loader path - we can hook into this for libraries loaded directly from managed code (CSteamworks), but the OS doesn’t provide a nice way to do that for native library dependencies (CSteamworks depends on steam_api). (On Windows, you get the “steam_api in project root” hack for free because the loader always looks in the current working directory.)
As a workaround, you could launch Unity with the environment variable LD_LIBRARY_PATH set to point to someplace where the steam api library lives. Alternatively, you could copy the library to somewhere that’s in your system’s loader path (e.g. /usr/local/lib) or Unity’s loader path (/opt/Unity/Editor).
We’re still considering a “nice” way to make this automagic.