社区问答

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

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

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

0 投票
Hello !

I know it's one of the most common problems with Wwise and Unity, because I've seen a lot of threads about it, but none of them seem to resolve the issue I'm having.

I updated Wwise inside my Unity project to 2019.2.2, and since then I have no sound when entering play mode, nore when I build. My banks are up to date, loaded on awake, and all my events names and IDs match.

I get error messages when entering play mode, about Event IDs not found, and the selected node being not available, although they match the ones in the banks txt file.

I've tried relocating my generated banks to the streaming assets folder, but nothing changes..

Hope someone might be able to help me !
问题关闭原因: After deleting the full library and asking the bank to load on start and not on Awake, I get sound in play mode, and no error message ! Hurray :D
分类:General Discussion | 用户: Antonin T. (100 分)
已关闭 用户:Mads Maretty S. (Audiokinetic)

2 个回答

0 投票
Hey Antonin,

Did you try deleting the SoundBanks along with the Wwise IDs and then generate new ones? And by the way, you shouldn't have to put them in the Streaming Assets folder anymore, cause the Wwise Unity Integration will just fetch the path to your SoundBanks from your Wwise project.

Other than that, you could try deleting the AkWwiseProjectData.asset file (don't have to close Unity for this), or the entire Library folder (close Unity first). You could also check that the Paths in the Project Settings > Wwise Editor is still OK.

Let us know how it goes!
用户: Mads Maretty S. (Audiokinetic) (40.2k 分)
Thanks for getting back to me so fast !

I've tried everything you told me, one by one, but the error message remains.

Should I try something different ? Or do you need more info ?
Hmm... Could you do a quick search to see if there's more than one Wwise ID file?

Otherwise, I would probably start from scratch by creating a new scene, add 1x SoundBank + 1x Event, and use the profiler to see why it cannot find the event. You could also print (from a script) the ID of the Event you've selected, and compare that to your events in Wwise.  

If you don't get it to work, try adding an image of the error or copy / paste it in here.
Okay, I've created a new scene and tried what you said, adding a bank and a simple event, playing a sound on start. The error is the same, and the profiler doesn't give me much info, except that it says it receives a request to unload the bank right after loading it. The unload is set to "Nothing" on my AkBank object, so I don't know where the request comes from.

Here is the picture of the profiler log : https://drive.google.com/file/d/1hBmY57WMCIDntMX5kLNKrrJ6Ozml3VRF/view?usp=sharing

Am I missing something ?

[EDIT] After deleting the full library and asking the bank to load on start and not on Awake, I get sound in play mode, and no error message ! Hurray :D

I have no idea what gets in the way of loading it in Awake though
0 投票

Good to hear you've got it working! 

Yes there's an issue in Wwise 2019.2.2 with the AkBank unloading the SoundBank right away if you set it to load in Awake()

Usually a good practise is to load the SoundBank in Awake(), so you don't have trouble with other AkEvents set to play in Start() because of the Order of Execution in Unity.
Until a fix is released (very soon I believe), you could try using a custom SoundBank Wwise-type, by creating a quick script with a "public AK.Wwise.Bank BankToLoad;" property with "BankToLoad.Load(false);" in the Awake() function. This way you'll get a nice picker in the Inspector (like in the AkBank) where you can select the SoundBank, and it'll load in Awake(). 

Probably something like this...

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LoadBankInAwake : MonoBehaviour {

     public AK.Wwise.Bank BankToLoad;

     void Awake() {
          BankToLoad.Load(false); // 
     }

}

Consider unloading the SoundBank in OnDestroy()

I will close the issue since you found a solution. Good luck with your project! 

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