Unity:在其他计算机上的独立构建中找不到本机插件

问题描述 投票:0回答:0

我已经将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);

    }
  • 我尝试将 dll 移动到可执行文件旁边的根文件夹中
  • 我厌倦了将 minimal api 更改为 .net framework
  • 原生插件在Plugins文件夹中

此外,有点奇怪的是,游戏(窗口)的设置分辨率未在其他计算机上使用。提前致谢,抱歉我的英语不好:)

c# c++ unity3d dll mono
© www.soinside.com 2019 - 2024. All rights reserved.