如何统一使用静态C ++库? [英] How to use static C++ library in unity?

查看:77
本文介绍了如何统一使用静态C ++库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在基于Unity3d的iOS上构建应用程序,并且我需要一个统一链接的静态库(.a). 但是似乎您不能直接在Unity中导入.a库,而您必须在XCode项目中导入它.您必须在XCode中编写一些额外的代码作为中间件.由于C#与& C ++会导致一些性能问题(大约3-5帧延迟),是在Unity中使用静态C ++库的唯一方法吗?

I'm building an app on iOS based on Unity3d, and I need a static library(.a) linked in unity. But it seems you can't import .a libraries directly in Unity, and you have to import it in XCode projects. You have to wrote some extra code in XCode as middleware. Since communicate between C# & C++ will cause some performance issue (about 3-5 frames delay), is there the only way to use static C++ library in Unity?

推荐答案

将.a和.h文件复制到Assets/Plugins/iOS"解决方案不适用于最新版本的Unity.我认为解决此问题的唯一方法是暂时在XCode中手动添加这些.a和.h文件.

"copy .a and .h files into Assets/Plugins/iOS" solution is not working on latest version of Unity. I think the only way to solve this problem is add these .a and .h files manually in XCode for now.

这篇关于如何统一使用静态C ++库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆