社区问答

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

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

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

0 投票
This is the scenario - lets say I have 100 events, and they are called in all different places across my Unity project.

When posting an event i use: AkSoundEngine.PostEvent(eventNameString, gameObject)

So I call the event with the name of the event, like "player_shoot_gun". Now lets say out of 200 places I post events from, I happened to spell the name of the event wrongly.

The error I get tells me the event ID - not helpful since I spelled the event name wrong, so its just a random number.

The error I get also tells me the name of the gameObject - only helpful if I can tell exactly what it is from that name. AKA If I had 100 prefabs of characters, and they each had a child gameObject called Sprite (or whatever), and thats the gameObject that the Event is attached to, I can't determine anything from just knowing the gameObject was called "Sprite".

Something similar to this just happened to me, and I basically had to find all references to "AkSoundEngine.PostEvent", and look through that huge list comparing every eventName string to my events. I eventually found the issue and fixed it.

I'm wondering how I could organize my project to avoid that tedious search in the future. Should I be routing all of my AkSoundEngine.PostEvent calls through some sort of 'Sound Manager' game object so I can add a Debug.Log line print the eventName string before it is played? Or is there some other way to get more info?

Thanks!

EDIT: Maybe worth noting, I was accidentally sending an empty string as the event name. Might be nice if there was a specific error or warning for that, rather than the generic "ID not found: 654231354"
分类:General Discussion | 用户: James M. (800 分)
修改于 用户:James M.

1个回答

0 投票

Hey James, 

Thanks for your feedback!

You can definitely make a custom Sound Manager and you can also modify the Wwise Unity Integration scripts directly.
But don't you get a "Wwise: Failed posting event:" message when misspelling the event name? What version of the Wwise Unity Integration do you use? 

Also, did you consider using Wwise Types instead of manually typing in the name? That way, you would not be able to misspell the Event. 

Let us know how it goes!

 

用户: Mads Maretty S. (Audiokinetic) (40.2k 分)
...