我使用Google Cardboard开始了我的项目,然后我导入了新的GoogleVR软件包来替换它。当我在Unity中玩游戏时,我的项目运行正常但是当我尝试为iOS构建它时,我在Xcode项目和Unity Cloud构建项目上都会出错。
在Xcode上:
ld: warning: arm64 function not 4-byte aligned: ltmp0 from /Users/gamedev/Desktop/VR1-iOS/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/gamedev/Desktop/VR1-iOS/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_endSettingsDialog", referenced from:
-[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Unity云版本:
[xcode] Undefined symbols for architecture armv7:
9352: [xcode] "_endSettingsDialog", referenced from:
9353: [xcode] -[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)
9354: [xcode] "_isOpenGLAPI", referenced from:
9355: [xcode] RegisterMonoModules() in RegisterMonoModules.o
9356: [xcode] ld: symbol(s) not found for architecture armv7
9357: [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
9358: [xcode] Showing first 200 warnings only
9359: [xcode] ** ARCHIVE FAILED **
9360: [xcode] The following build commands failed:
9361: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-gccgnjkpqhormzcosgksevxlzeea/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/APPLICATION_PATH/vr1.app/vr1 normal armv7
9362: [xcode] (1 failure)
我注意到这种问题的大多数答案都是在推送源代码时引用SourceTree(这就是我正在使用的)忽略.dll文件。目前我的工作目录中没有任何.gitignore文件。
更新 我已升级到Unity 5.6,错误有所改变:
"_endSettingsDialog", referenced from:
-[DismissDialogViewController viewDidAppear:] in libvrunity.a(unity.o)
Undefined symbols for architecture arm64:
"_isOpenGLAPI", referenced from:
_iOSDevice_isOpenGLAPI_m3529398287 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _iOSDevice_isOpenGLAPI_m3529398287)
ld: symbol(s) not found for architecture arm64
在链接的库之间进行检查时(在Build Settings中)我注意到我有libvrunity.a
和libgvrunity.a
所以我删除了第一个并且错误消失了,但我仍然有第二个关于OpenGL 。奇怪的是,该项目在整体上完美无瑕地运作。
答案 0 :(得分:2)
显然,这完全取决于Google VR SDK。当前版本1.30不支持Unity 5.6中的本机iOS。
他们唯一能解决的问题是:
libvrunity.a
和libgvrunity.a
个库不幸的是,此程序阻止我在Unity编辑器中显示立体视图。
我们需要等待1.40更新。我已经开了一个issue on GoogleVR GitHub repository。
答案 1 :(得分:0)
您似乎丢失了文件或未删除的旧文件:我建议删除所有iOS插件并再次重新导入正确的插件。