下载了UnityARKitPlugin,编译的时候在Xcode中链接的时候报错:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ARObjectScanningConfiguration", referenced from:
objc-class-ref in ARKitNativeObjectDetection.o
"_OBJC_CLASS_$_ARObjectAnchor", referenced from:
objc-class-ref in ARKitNativeObjectDetection.o
"_OBJC_CLASS_$_AREnvironmentProbeAnchor", referenced from:
objc-class-ref in ARSessionNative.o
objc-class-ref in AREnvironmentProbe.o
"_OBJC_CLASS_$_ARWorldTrackingConfiguration", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_ARReferenceImage", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_AROrientationTrackingConfiguration", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_ARImageAnchor", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_ARAnchor", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_ARWorldMap", referenced from:
objc-class-ref in ARWorldMap.o
objc-class-ref in ARSessionNative.o
objc-class-ref in ARKitNativeObjectDetection.o
"_OBJC_CLASS_$_ARPlaneAnchor", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_ARSession", referenced from:
objc-class-ref in ARSessionNative.o
"_OBJC_CLASS_$_ARReferenceObject", referenced from:
objc-class-ref in ARWorldMap.o
objc-class-ref in ARSessionNative.o
objc-class-ref in AREnvironmentProbe.o
objc-class-ref in ARKitNativeObjectDetection.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我使用的Unity版本是2019.4。解决的方案是在Unity的菜单 window -> Package Manager里面添加了ARKit XR Plugin。
![](https://img.haomeiwen.com/i10372904/700cc92001be7263.png)
网友评论