未找到符号:Google VR SDK 中的 _UnityGetAudioEffectDefinitions

Symbol not found: _UnityGetAudioEffectDefinitions in Google VR SDK

这是我在 XCode iPhone 5S 模拟器中尝试 运行 Unity3D 项目(Sample Treasure Hunter)时遇到的错误。

dyld: Symbol not found: _UnityGetAudioEffectDefinitions
   Referenced from: /Users/romanmac/Library/Developer/CoreSimulator/Devices/333B47B5-B6BC-41E4-BD6D-611A9B4CE1DA/data/Containers/Bundle/Application/D8B8D3EF-F872-42F8-8407-3EC20B13474E/ProductName.app/ProductName
   Expected in: flat namespace
  in /Users/romanmac/Library/Developer/CoreSimulator/Devices/333B47B5-B6BC-41E4-BD6D-611A9B4CE1DA/data/Containers/Bundle/Application/D8B8D3EF-F872-42F8-8407-3EC20B13474E/ProductName.app/ProductName
 (lldb) 

在设备上运行良好。

Unity 5.4.0f3 个人版 Xcode 7.3.1 (7D1014)

这是 iOS 播放器的设置:

我该如何解决这个问题?

基本上您可以将 CardboardAppController.mm 中的 createUnityView 修改为:

- (UnityView *)createUnityView {
#if !TARGET_OS_SIMULATOR
  UnityRegisterViewControllerListener(self);
  UnityRegisterAudioPlugin(UnityGetAudioEffectDefinitions);
#endif
  UnityView* unity_view = [super createUnityView];
#if !TARGET_OS_SIMULATOR
   createUiLayer(self, (UIView *)unity_view);
#endif
  return unity_view;
}