http://blog.csdn.net/ggtaas/article/details/40088465
前提:
1、 你会unity3d开发并懂得怎么发布程序
2、 你会iOS开发,具有iOS开发证书以及iOS设备,因为需要发布真机调试(有开发者账号最好,没有的话可以去淘宝购买一个或者找朋友要一个证书也可以)。
步骤:
具备上述两个条件并且具有Vuforia官网账号后,按照下面步骤进行即可:
1、 官网下载Vuforia for Unity3d的开发包,最新的是3-0-10:
2、 将开发包导入unity开发环境中,unity是4.3.4,
3、 导入Xcode中,我使用的版本是6.0.1
4、 编译,使用真机调试:
如果使用早期的vuforia for unity包,或者unity和xcode版本问题,可能会发现编译出错:
a) 问题:Classes/Unity/CMVideoSampling.mm:51:122: Use of undeclaredidentifier 'GL_BGRA_EXT'
解决方案:添加#include <OpenGLES/ES2/glext.h>
b) 问题:Undefined symbols forarchitecture armv7:
"__curOrientation",referenced from:
-[UnityAppController application:didFinishLaunchingWithOptions:]in UnityAppController.o
ld: symbol(s) not found for architecturearmv7
clang:error: linker command failed with exit code 1 (use -v to see invocation)
解决方案:将iPhone_View.mm文件下的_curOrientation的修饰符static删掉:
//static ScreenOrientation _curOrientation = orientationUnknown;
ScreenOrientation _curOrientation =orientationUnknown;
我使用最新版本的vuforia for unity的包(3-0-10)编译没有问题,可能其他包会有这样的问题。
5、 发布真机,看到最终效果。
效果点链接:
http://blog.csdn.net/ggtaas/article/details/40088465