社区问答

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

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

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

0 投票

Not sure I'm even asking this right. My programmer knows nothing of Wwise, so it's up to me to integrate it with Unity. I don't know what HE needs to do to make Unity speak to Wwise. I installed the integration package, created a sound, made an event, and generated a soundbank.

Does the Unity script that calls my event need to have the event name in there? I'm assuming that's how it works. What line of code does it need to be, cuz I think that's the problem, my programmer has the wrong "type" of code in there, or whatever. Does this make sense to anyone?

This is the script that calls for sound right now:

void PlayOpenSound(){
              audioSource.Play();

What do I need to do with this?

分类:General Discussion | 用户: Andy B. (270 分)
I checked that folder (it's Android for me), and the bank files are there:

Init.bnk
PluginInfo
SoundbanksInfo
Subverses.bnk

I was taught that the soundbanks path needed to be something like this: Unity/assets/streaming assets/audio/generatedsoundbanks/android/english

has that changed?
You still need to generate the SoundBanks for the Editor platform (if you are running the Mac Unity Editor, generate for Mac, and same for Windows).

The path you gave me is correct, this is there the code will look for them.
THAT DID IT!! Thanks a ton. Can I keep you on retainer? I'm sure I will need more help.

1个回答

0 投票

The simplest way to play a sound using the integration is to use the Wwise picker and drag & drop SoundBanks and Events to Unity GameObjects. See this tutorial for more information: https://www.youtube.com/watch?v=-VuXKTsG3Uc

If you need to post an event from a script, this is the simplest way to do it:

AkSoundEngine.PostEvent("Footstep", gameObject);

Make sure the SoundBank containing the event is loaded, though!

If you need a more precise answer, feel free to let me know!

用户: Benoit S. (Audiokinetic) (16.0k 分)
I followed that video and ended up with a couple major errors in Unity.

WwiseUnity: Failed load Init.bnk with result: AK_FileNotFound
UnityEngine.Debug:LogError(Object)
AkInitializer:Awake() (at Assets/Wwise/Deployment/Components/AkInitializer.cs:169)

and  

Wwise: Bank Subverses failed to load (AK_FileNotFound)
UnityEngine.Debug:LogWarning(Object)
AkBankHandle:LoadBank() (at Assets/Wwise/Deployment/Components/AkBankManager.cs:43)
AkBankManager:LoadBank(String) (at Assets/Wwise/Deployment/Components/AkBankManager.cs:108)
AkBank:HandleEvent(GameObject) (at Assets/Wwise/Deployment/Components/AkBank.cs:55)
AkUnityEventHandler:Awake() (at Assets/Wwise/Deployment/Components/AkUnityEventHandler.cs:39)
AkBank:Awake() (at Assets/Wwise/Deployment/Components/AkBank.cs:30)
It seems the banks cannot be found. Can you double check you generated your SoundBanks? In a Windows Explorer (or Finder) window, browse to your Wwise Project, and check the GeneratedSoundBanks folder. In that folder, you should see a folder named after your platform (Windows or Mac), each containing some .bnk files. Are they there?

If there is nothing there, make sure to generate your SoundBanks. In Wwise, go to Layouts > SoundBanks, and generate all your SoundBanks for your platform.
So, what do I do with the "footstep" script, exactly? add it to some existing script that controls the action of the character? or make a whole new script just for the footsteps?
Using key input to call wwise events in unity
...