【发布时间】:2013-10-26 18:17:43
【问题描述】:
基本上我正在尝试让桌面渲染插件工作(http://docs.unity3d.com/Documentation/Manual/NativePluginInterface.html)。
这是我所做的:
- 已下载示例项目 (http://docs.unity3d.com/Documentation/Images/manual/RenderingPluginExample42.zip)。该包已经编译并位于 Assets/Plugins 文件夹中。这在运行 Unity 时运行良好。
- 在 XCode 5 中打开了 XCode 项目。
- 在文件“RenderingPlugin.cpp”中将
#include <OpenGL/OpenGL.h>更改为#include <OpenGL/gl.h> - 更新 XCode 项目设置:
- 在 XCode 中构建新包并将新包复制到 Assets/Plugins(替换现有包)。
- 重新启动 Unity 并尝试再次运行演示。现在 Unity 给出以下错误: DllNotFoundException: /Users/mono/Downloads/RenderingPluginExample42-1/UnityProject/Assets/Plugins/RenderingPlugin.bundle/Contents/MacOS/RenderingPlugin
一些观察:新的包文件 (17kb) 比旧包文件 (29kb) 小得多。
【问题讨论】:
-
你确定你的代码链接到 OpenGL.framework 了吗?我也有 CoreGraphics.framework 连接到我的插件。