故障排除

Wwise Components/Types show stale or inconsistent data

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.

Note.gif
备注: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。有一些脚本是特定于平台的。

在 Unity 控制台中的 DllNotFoundException

如果您在 Windows 的 Unity 控制台中看到一个关于 AkSoundEngine 的 DllNotFoundException 消息,这可能是由两个缺失的依赖项引起的:

没有任何声音

如果您在游戏中没有听到任何声音,请检查以下内容:

无法连接 Wwise Profiler

如果您的游戏运行在 Windows 上,请检查以下内容:

如果您的游戏在另一台计算机或控制台上运行,请检查以下内容:

安装过程中的错误 —— 在 Unity 控制台中访问路径被拒绝

如果您在 Unity 控制台中看到 Wwise: Error during installation: Access to the path is denied 消息,请检查以下内容:

错误:插件没有注册

您的 Wwise 工程使用了一个需要授权的插件,而它还没有包含在您的 AkSoundEngine 动态库中。请参阅 添加插件

在 Mac 的 Unity Console 中,"多个插件的名称相同"

使用用于 Mac 的 Unity,在导入 Integration 时,Unity Console 可能会显示很多如下的错误:

Multiple plug-ins with the same name 'aksoundengine' (found at 'Assets/Wwise/Deployment/Plugins/Mac/Release/AkSoundEngine.bundle' and 'Assets/Wwise/Deployment/Plugins/Mac/Debug/AkSoundEngine.bundle'). 这意味着一个或多个插件将设置为与 Editor 兼容。Editor 一次只能使用一个插件。

这些错误可以被忽略,这很安全,因为安装过程将正确地激活正确的插件。

使用 Xbox One 插件时,"初始化声音引擎失败"

在 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 插件。

Generated at Tue Dec 4 10:52:21 2018 for Wwise Unity Integration by  doxygen 1.6.3