社区问答

欢迎来到 Audiokinetic 社区问答论坛。在此,Wwise 和 Strata 用户可互帮互助。如需我们团队直接提供协助,请前往技术支持申请单页面。若要报告问题,请在 Audiokinetic Launcher 中选择“报告错误”选项(注意,问答论坛并不会接收错误报告)。我们内部设有专门的错误报告系统,会有专人查看报告并设法解决问题。

要想尽快得到满意的解答,请在提问时注意以下几点:

  • 描述尽量具体:比如,想达到什么样的目的,或者具体哪里有问题。
  • 包含关键细节:比如,Wwise 和游戏引擎版本以及所用操作系统等等。
  • 阐明所做努力:阐明自己为了排除故障都采取了哪些措施。
  • 聚焦问题本身:聚焦于问题本身的相关技术细节,以便别人可以快速找到解决方案。

0 投票
Hello,

To summarize the issue, Event ID's aren't recognized in my wwise integrated UE5 project until the event is manually played by right clicking the AKEvent asset and clicking the Play Event action in editor.

I have a wwise project with a single sound bank and 2 events. These events work as expected in the wwise project. I've integrated with Unreal 5 and successfully can play audio.

In my Unreal project I'm calling the events via the AudioDevice->PostEventOnActor function in c++, passing in the explicit event id for the event I'd like played. I have a properly named AK Event asset for each event. Right clicking play on these events works as expected.

This issue is that upon initially opening the project (or in a packaged build), attempting to post the event by ID at runtime results in "Event ID not found". However, if I right click and play any one of the the events in the content browser, it now locates the event's and plays as expected at runtime.

In troubleshooting I thought it may be related to the InitSound bank being loaded which doesn't contain a reference to these events, and that playing the event in editor via the AK action may be loading and caching the proper soundbank behind the scenes - however I can't confirm this and am finding conflicting information on if this current version requires me to explicitly load my Soundbank prior to posting the event with the introduction of Auto Defined Sound banks and EBP. It seems that this version of wwise stripped the ability to toggle EBP and auto asset sync on or off to test if it's related.

Any advice on this?

Details
Unreal Engine Project Version: 5.0
Wwise Integration 2022.1.0.7985.2398
分类:General Discussion | 用户: Mason E. (140 分)

1个回答

+1 投票
 
已采纳

Hi Mason,
The 2022.1 integration is designed so that loading an Unreal asset corresponding to a Wwise object will load its required resources (SoundBanks and media files). Because you are following a code path that does not require you to load the Event assets before posting them, the sound engine does not have the information necessary to play the event. Right-clicking or inspecting an asset in the Editor automatically loads it (and assets don't really get unloaded when working in editor), which explains why previewing your events would temporarily fix the problem.

The simplest way to ensure you are loading your Events properly before playing them is to use PostEvent API functions that take a reference to an AkAudioEvent as an argument. Another way to ensure these assets are loaded is to reference them in some manner in the Maps or Blueprints that use them, this way all the necessary resuorces will be loaded with the level (or asset using the blueprint).
If you are working purely from code, you will likely have to use Unreal's asset loading uitilities such as the StreamableManager.

用户: Etienne R. (Audiokinetic) (1.1k 分)
采纳于 用户:Mason E.
Thanks for the quick and thorough response! Storing an AkAudioEvent and passing the reference into AudioDevice->PostAkAudioEventOnActor worked like a charm. Confirmed my suspicions that calling an event by ID without prior explicit loading wasn't working as I had expected.

Thanks for the help.
...