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

时间:2016-08-22 23:36:43

标签: unity3d google-vr

这是我在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 Personal Xcode 7.3.1(7D1014)

以下是iOS播放器的设置:

enter image description here

enter image description here

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

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

- (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;
}