下載了UnityARKitPlugin盅抚,編譯的時(shí)候在Xcode中鏈接的時(shí)候報(bào)錯(cuò):
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。