社区问答

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

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

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

0 投票

Hi there,

I recently upgraded to the latest Wwise Unity integration, most things seem to working well, but as soon as the game loads in to the main first level (after a hub area) all the audio on the main character stops working and I get the Error:

Wwise: Unknown game object ID. Make sure the game object is registered before using it

This was all working fine before I updated the integration. 

I have seen other posts on here about this error, but most seem to be in reference to deleting objects, whereas we are just disabling, loading the next scene, and re-enabling the gameobject.

Anyone have a workaround?

 

Thanks

 
分类:General Discussion | 用户: Ralph C. (270 分)

2 个回答

0 投票
This should be fixed in 2015.1.1.  Did you install that version?
用户: Mathieu J. (Audiokinetic) (7.1k 分)
yes, it's the latest integration, as I said
Any other info for us? It would be much appreciated.
I just tried to reproduce this without success. Here's what I did:
1- Create scene "1.unity" with a Cube and a Sphere.
2- Add an AkAmbient and an AkBank to the Cube, set to play on start
3- Create scene "2.unity" with a Capsule
4- Add an AkAmbient and an AkBank to the Capsule, set to play on start
5- Write a script that sets DontDestroyOnLoad to true on a GameObject, and attach it to the Cube and the Sphere in scene 1.
6- Write a script that calls SetActive(false) on the Cube and then loads scene 2, in the OnMouseDown function. Attach it to the sphere.

Now, when I preview the game in the Editor, I hear my first sound. When I click the Sphere, the Cube disappears, but its sound continues to play. The capsule appears, and its associated sound begins. No error messages are printed in the console.

Is this similar to what you are doing?
Hi,

No our whole game runs in one scene, what is happening is:

1. The game loads, I'm loading a bank with the general sounds in them.
2. The Game Starts, our characters sound is perfectly fine
3. When the user walks into an area to go to the first level:
   a) He is disabled
   b) The level geometry is loaded in
   c) The Soundbank for the level is loaded in
   d) He is re-enabled
4. I get the error I mentioned above and none of the characters sounds work any more.

There is no difference in how this all works apart from the new plugin installation
Any ideas for me? Thanks
This is strange... This use case should be covered by the bug fix in 2015.1.1 Mathieu mentioned.

Have you tried connecting the profiler to your game? In the Game Object Profiler layout (F12), you should see all registered game objects, and their registration time. You can compare this to the time at which the event was posted, in the Profiler layout (F6). This should help you debug when the game object is registered vs the time the event is posted, and why it says "Unknown game object ID"
Hi Benoit,

Thanks for the comment. I have looked at the game object profiler layout and I can see that the object I am talking about is unregistered when it gets disabled.

This is quite strange, as the main character is made up of two distinct segments (body and Head), and they are both disabled by the parent GO when the new section is being loaded in. They are both disabled in the exact same way. Yet in the Wwise game Object profiler the head is shown to be unregistered, but the body is not.

So the bodys audio works fine, but the heads throws the error.

I did also notice that the head isn't reacting to the Environment Area (there is a rigidbody attached to the head before you ask :P)

Seems like the bug has crept back in.
0 投票
 
已采纳
OK, so I finally figured out what was causing this, although I still feel it is a bug.

Because of an error in our code the head was getting disabled in code twice (although the body was too - see the comments below if you want to see the whole process - but somehow it was OK?).

Wwise did not seem to like this, and after the second disable message in Unity decided that the Object should be unregistered.

I'm still not sure why this only happened to the head and not the body, although the head had a lot more going on just before it is disabled so maybe some of these calls were causing Wwise to think that it had been destroyed rather than disabled.

 

Thanks for the help all!
用户: Ralph C. (270 分)
After reading this post, I have found a possible bug that has been introduced in the latest version when GameObjects are disabled.

Thanks for reporting this, I will work on a fix ASAP!
...