If you notice Wwise Components, such as AkAmbient or AkState, lose references to their Wwise object, you may have added AkWwiseProjectData.asset to version control. If AkWwiseProjectData.asset is locked, such as often is the case when under version control, new files will be created of the form AkWwiseProjectData##.asset. If this occurs, delete all of them, then click Auto populate in the Wwise Picker to regenerate the file.
| 备注:Do not keep AkWwiseProjectData.asset under version control! This is a temporary cache file for the Wwise project data, so as to avoid having the Wwise Picker continuously parse the Work Unit files. |
如果刚从以前的 Wwise 版本升级到了新版本,那么您可能会有重复的脚本。在版本 2013.2.8 中,UNITY_PROJECT_ROOT\Assets\Wwise\Deployment\Examples 文件夹重命名为 Components。如果您没有对 Examples 文件夹中的脚本作出任何更改,那么只需要删除它。
另外,如果您是在多个平台上开发,请确保已经为每个开发平台安装了 UnityPackage。有一些脚本是特定于平台的。
如果您在 Windows 的 Unity 控制台中看到一个关于 AkSoundEngine 的 DllNotFoundException 消息,这可能是由两个缺失的依赖项引起的:
Debug config,那么还需要安装Microsoft Visual Studio 2010 Debug Redistributables。通常情况下,默认会安装 Profile 配置,所以这应该不是问题,除非您时手动安装的 Debug config。如果您在游戏中没有听到任何声音,请检查以下内容:
AkSoundEngine.LoadBank 调用。AkSoundEngine.PostEvent 调用。如果您的游戏运行在 Windows 上,请检查以下内容:
background 设置中的 Run 已经启用(menu File > Build Settings > Player Settings)。Debug 和 Profile 启用了通信代码。如果您的游戏在另一台计算机或控制台上运行,请检查以下内容:
Connect To IP 按钮。如果您在 Unity 控制台中看到 Wwise: Error during installation: Access to the path is denied 消息,请检查以下内容:
Debug,Profile,Release): 从 Wwise Setup 窗口安装新的 Unity Integration?Debug,Profile,Release)。 unity_wwiseids_error 在用于 Mac 的 Wwise 上,在生成 SoundBank 过程中出现错误 —— 不能写入 Wwise_IDs.h 如果在使用用于 Mac 的 Wwise,在生成 SoundBank 过程中您看到一个错误,即不能写入 Wwise_IDs.h,那么检查如下内容:Header file path 设置到 SoundBank 生成的地方。您的 Wwise 工程使用了一个需要授权的插件,而它还没有包含在您的 AkSoundEngine 动态库中。请参阅 添加插件。
使用用于 Mac 的 Unity,在导入 Integration 时,Unity Console 可能会显示很多如下的错误:
这些错误可以被忽略,这很安全,因为安装过程将正确地激活正确的插件。
在 Xbox One 上,Unity 内置的音频系统初始化了音频所需的硬件,因此 Wwise 的初始化失败了。要解决这个问题的话,可以禁用内置音频,方法是前往 Assets > Project Settings > Audio,选择 "Disable audio" 复选框。
注意,由于一个已知的 Unity 5.0.2 的问题,即使启用了 "Disable audio" 复选框,音频硬件也会被初始化。一个解决方法是,在 AkInitializer.cs 中,将以下代码:
AkPlatformInitSettings platformSettings = new AkPlatformInitSettings();
AkSoundEngine.GetDefaultPlatformInitSettings(platformSettings);
platformSettings.uLEngineDefaultPoolSize = (uint)lowerPoolSize * 1024;
platformSettings.fLEngineDefaultPoolRatioThreshold = memoryCutoffThreshold;
更改为:
AkPlatformInitSettings platformSettings = new AkPlatformInitSettings(); AkSoundEngine.GetDefaultPlatformInitSettings(platformSettings); platformSettings.uLEngineDefaultPoolSize = (uint)lowerPoolSize * 1024; platformSettings.fLEngineDefaultPoolRatioThreshold = memoryCutoffThreshold; #if UNITY_XBOXONE && !UNITY_EDITOR platformSettings.uMaxXMAVoices = 0; #endif
注意,这样更改之后,将禁用 XMA 插件。
1.6.3