我已经将GameNetworkingSockets库编译并导入到unity Plugins文件夹中。在我的电脑上进行独立构建并运行时,一切正常,但在另一台电脑上运行构建时,找不到 dll 文件。我已经确认 dll 库包含在构建数据/插件文件夹中。
internal static class Native
{
private const string nativeLibrary = "GameNetworkingSockets";
[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
internal static extern bool GameNetworkingSockets_Init(IntPtr identity, StringBuilder errorMessage);
}
此外,有点奇怪的是,游戏(窗口)的设置分辨率未在其他计算机上使用。提前致谢,抱歉我的英语不好:)