社区问答

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

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

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

0 投票
Since I updated to Unity 4.6.3, setting AkAmbient events to be performed upon "Destroy" simply fails. If I call the events from code, all is fine (so the issue is not with the Wwise project file),

but stopping a sound from the Unity editor with an AkAmbient component now fails. I'd also like to point out that so far this always worked.

 

Is there a compatibility issue between Unity 4.6.3 and the latest Wwise build?
分类:General Discussion | 用户: Ede T. (170 分)
修改于 用户:Ede T.

2 个回答

0 投票
Since there was no reply to this yet and the issue still persists, I did additional testing and thought I'd provide some more details.

I have a play sound loop event and a stop sound loop event (environmental sound effect). What I normally do is I place a Unity GameObject and add two AkAmbient components to it.

One of the components plays at "Start" and plays the loop. The second component happens upon "Destroy" and stops the loop. Since Unity 4.6.3, this doesn't work. It did work before.

It's also worth noting that doing the same from code (calling the stop event from OnDestroy) still works. It's just the GameObject approach that doesn't work anymore.

I also get an error message when the GameObject is destroyed. Unfortunately the error message is just the following: "!IsDestroying()" . That's it. If I double-click that error message, AkSoundEngine_Windows.cs opens and the line "in_gameObjectID.AddComponent<AkGameObj>();" is marked as the reason for that error (in the last PostEvent method overload).

 

I hope this helps and this issue can be resolved soon.
用户: Ede T. (170 分)
Sorry about the delay on that. I took a look at this issue, and there is indeed a problem with the script execution order. During initialization, we need to register the AkGameObj before posting any events, etc., so in the script execution order, AkGameObj is put quite early.

However, during the destroy flow, the reverse is true: we need the AkGameObj to do the actions, but AkGameObj runs before the other scripts, and so it is unregistered when we get to them.

A fix will be available in the next Unity integration, which should be coming out soon.
Though this issue is now gone, Wwise randomly crashes the Unity editor and the exported game as well. (I'm not alone in this, others have reported it as well.) Also, the "!IsDestroying()" error message is still displayed for every sound stopped this way (and it still points to the same line I described above).
0 投票
 
已采纳
After a bit of back and forth, the problem was narrowed down to a corner case with posting events from the OnDestroy function. A fix will be available in the next integration.
用户: Benoit S. (Audiokinetic) (16.0k 分)
...