Hi. I’m not sure if this is the correct section for this issue, but it seemed to fit the best.
We are trying to integrate Valve’s GameNetworkingSockets into our game. I’ve successfully been able to build the DLLs and it things work in the Editor and for stand alone Windows builds on my machine.
The issue I’m running into is that when a different computer tries to run the standalone build or in the Editor it throws this error (this is the first call into the GameNetworkingSockets C# wrapper that calls into the DLL):
GameNetworkingSockets assembly:<unknown assembly> type:<unknown type> member:(null)
Valve.Sockets.NetworkingIdentity.Clear () (at C:/[REDACTED]/Assets/ValveSockets/ValveSockets.cs:398)
I’ve seen in other posts that got a similar error related to DLLs not loading to use Dependency Walker to see what other DLLs it depends on. I did that and all the DLLs exist on the other machine.
One thing that is different is that I built the GameNetworkingSockets DLLs on my machine and it is Windows 11, but the other machine is Windows 10. Both are 64-bit versions, I saw a few other posts mentioning that if the DLL was built for 64-bit but trying to run on a 32-bit Windows it would throw a similar error.
Does anyone have any other suggestions on what I can try or look into to see why this error is happening?
Maybe there was some kind of hidden dependency was added when i enabled these within Visual Studio under the Tools > Get Tools And Features?
Desktop Development with C++
Game Development with Unity
Game Development with C++
EDIT
I tried a standalone build on a few other machines in the office and they all worked, they are all Windows 10. So it seems to be isolated to this one specific machine.
Not sure if it matters, but we are using Unity 2021.3.38.
EDIT 2 SOLVED
Turns out there is a better version of Dependendies, and when I used that, it had a few more DLLs that weren’t there in the when I ran it through the old version. And one of them wasn’t found on the machine. Then I noticed a bunch of the DLLs ended with D.DLL
Turns out GameNetworkingSockets default build type in their CMake files is RelWithDebInfo
so it pulled in a few debug DLLs. Just needed to add this -DCMAKE_BUILD_TYPE=Release
when running the cmake command they provide on their build instructions page to build the release versions.