版本
Wwise Unreal Integration Documentation
|
You can use Wwise Unreal 集成 features to map Unreal Cultures to Wwise languages and ensure that your corresponding Unreal and Wwise projects support the same set of languages for asset localization. After the mapping is complete, you can change languages with certain Blueprint nodes or through the C++ AkAudioDevice API.
For Unreal Cultures, you can use any ISO-639-1 language code and, optionally, an ISO 3166 country code (fr-CA, en-GB, and so on). For the Wwise Language, you can use any of the languages in your Wwise project. For more information on localization in Wwise, refer to Localizing Your Project.
To map an Unreal Culture to a Wwise language:
注記: The Wwise language must match the specified language in the Wwise project exactly (capitalization, spacing, and any special characters such as parentheses). |
After you map the Unreal Cultures to the Wwise languages, you can use Blueprint nodes to change audio languages and cultures in Unreal. Two Blueprint nodes are available:
You can change the audio language or culture directly from code in the C++ AkAudioDevice API FAkAudioDevice::Get()->SetCurrentAudioCulture()
. You can pass either a Wwise language or an Unreal Culture to the C++ function or Blueprint node.
When SetCurrentAudioCulture()
is called:
FWwiseResourceLoader::SetLanguage
with the EWwiseReloadLanguage::Immediate
parameter.IWwiseStreamMgrAPI::SetCurrentLanguage
。The asynchronous variant immediately calls IWwiseStreamMgrAPI::SetCurrentLanguage
, and FWwiseResourceLoader::SetLanguage
(which does the heavy lifting of reloading Wwise resources) is called in an asynchronous task. 在完成 FWwiseResourceLoader::SetLanguage
后,会触发 Completed Blueprint Event。
Advanced users might want to use different values of EWwiseReloadLanguage
. If this is the case, we recommend that you avoid using the supplied Blueprints and the AkAudioDevice API and to call the FWwiseResourceLoader::SetLanguage
and IWwiseStreamMgrAPI::SetCurrentLanguage
functions directly.
The three possible states of EWwiseReloadLanguage
are:
IWwiseSoundEngineAPI::StopAll()
to stop all playing sounds before resources are reloaded.注記: Due to limitations in the Wwise Sound Engine, we recommend that you change languages when no localized sounds are playing. If an event is playing, the Sound Engine does not unload the bank that contains it. A loaded bank cannot be replaced by a new bank with the same name, even if it is in a different language. The bank must be unloaded first. |
在烘焙本地化的 Wwise 素材时,会随素材一起打包各个语言的资源(.bnk 和 .wem 文件)。Refer to 烘焙和打包 on the 已知问题 page.