Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

+2 votes

I'm seeing errors every frame related to registering game objects, it looks like one error per AkGameObj:

Wwise: Unknown game object ID. Make sure the game object is registered before using it and do not use it once it was unregistered.:

I'm on Unity 2019.3.7f1 on Windows and Wwise 2019.2.1.7250.1718. I've manually added a few events to game objects in my scene. Two of them are present at start and there's of course the camera. All three objects - the two ambient sources and the camera - and throwing this error every frame.

in General Discussion by Joshua L. (120 points)
Ive had this today, and it was a nightmare (same wwise version as you), i am in the process of rolling back to 2019.2.0.7216  whenever i add an Akambient or akevent it generates this condition, then it completely breaks. Never had this trouble previously on the version i am rolling back to.

Cost me 4hrs today and another 5hrs the other day trying to fix it.  No fun!

Recreated soundbanks, regenerated, deleted and recreated, error still persists.  There is also something broken if you uninstall a plugin (e.g wwise motion), remove all references (wwise project is fine) but it generates 100s of warnings in unity you cannot get rid of.  7250.1718 is the most problematic i have had to date.
So i downgraded wwise versions and still no love. Feel like something is broken within the project. Have tried downgrading 2 seperate versions and am getting the same results.  Hope someone figures this out.
Thanks for sharing your experience Liam! I must admit I'm pretty disappointed, this is my first experience with Wwise and it's straight-up dead in the water.

And I just came from trying to use FMOD in our new project, and that had the issue where the audio was coming out of a different device than Unity. And I guess the expected thing is to program that switch ourselves?! I don't even get how we can find out the exact code Unity uses in order to recreate audio device output logic ourselves, let alone think it's reasonable to actually do that work in a Unity SDK.

So FMOD and Wwise are unusable right now. It has left me shocked.
Just an update on this.  I discovered that if you connect wwise to the unity scene and run the profile with API enabled, i was getting floods of API calls. I suspect this is what is happening in my case:
1. We have an audio events game object on a prefab, (just a blank game object with a custom script to post the event from a list), like a modified AKEvents script.
2. The prefab is on multiple objects (has the same gameobject name)
3. We aren't registering / unregistering before and after the post event which might mean that all objects are trying to make API calls to register at the exact same time. see here  https://www.audiokinetic.com/library/edge/?source=Help&id=ErrorCode_UnknownGameObject

I am going to update my code and test this out, it makes total sense as the API calls are causing voice starvation and flooding things.
I have tested wwise in a blank unity project and the latest 2019 integration and it works with multiple akambients no problem.
It is definitely something in my scene and i suspect it is these API calls flooding it.  Ill keep you updated.
With wwise, when working in unity you can just change your windows device in the system tray and it will output to that.  In wwise if you go up to audio preferences and set your output there, it will play through whatever you like. I'm about 12 months into wwise and i love the workflow, it has changed my results dramatically. There are just so many processes that are going on to make it all work, so when things go wrong it can be quite dramatic. Most of these ID issues are sorted by simply regenerating the soundbanks, however in my case i know it is scene based (something we are doing) and i've torn everything apart to find it. Pretty sure i am onto it though. If theres anything i can help with let me know.
Hmm...maybe there's something weird with my install and the script execution order is wrong. What's it supposed to be for the 4 sensitive scripts?
Did a new install to check; nope, they were set correctly :(
This also happens occasionally in Wwise 2021.1.4.7707, Unity v 2020.3.25f1

I'm trying to rebuild the sound banks and check the soundbank header path

EDIT - clearing and rebuilding the sound banks worked for me.

3 Answers

0 votes

Resolved this issue after 40+ hours of hell.  It was multiple things, i hope this helps you out.

My API Calls now look like this: (i had like 900 calls now like 2):

https://dlab-workingfiles.s3-ap-southeast-2.amazonaws.com/Liam/API_Calls.PNG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAV5S7JN27HQT7L7FZ/20200410/ap-southeast-2/s3/aws4_request&X-Amz-Date=20200410T103254Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=005cb125f67cfb9ba9b3398addc877982d29d6c62be2c11f181f44691d9f8cad

- Unsure if this is required (probably not) but before you post an event from a custom script, AKSoundEngine (Register) > AKSoundEngine Post > AKSoundengine (Unregister) commands in your script.

- Ensure you are not posting events from gameobjects with identical names in prefabs (Use unique names for your unity game objects with attached sounds)

- Ensure your Soundbank header path is correct (it should be pointed to:  Assets\StreamingAssets\Audio\GeneratedSoundBanks) see the mistake in this image

https://dlab-workingfiles.s3-ap-southeast-2.amazonaws.com/Liam/elliotvirus.PNG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAV5S7JN27HQT7L7FZ/20200410/ap-southeast-2/s3/aws4_request&X-Amz-Date=20200410T103135Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=1057946f8985d69fc05e372ab90af2a11d66d188ec7db1d5d9821df910e343dd

- Ensure script execution order in unity is set like this: (this stopped the flooding of API Calls in the wwise profiler)

https://dlab-workingfiles.s3-ap-southeast-2.amazonaws.com/Liam/ScriptExecutionOrder.PNG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAV5S7JN27HQT7L7FZ/20200410/ap-southeast-2/s3/aws4_request&X-Amz-Date=20200410T102727Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=6989cc1a8fa5fd227c5e1a5546c84b19be7efbcb9526e6f538845b616cb17904

by TAFENSW (270 points)
Any chance you can post these images again? The links seem to be expired. I'm having similar issues with upgrading my Unity integration and could really use these to compare against. Thanks!
Would be possible to update the link to the screenshots? It seems they are broken. Thank you :)
0 votes

Posting another solution here:
On my side it was because the AkInitializer gameObject was instantiated by the code (on RuntimeInitializeOnLoadMethod), while the AkAudioListener was already set on the camera.
Using a script like this on the camera gameObject instead of the AkAudioListener fixed the issue:

using UnityEngine;

public class AudioListenerInitializer : MonoBehaviour
{
    protected void Start()
    {
        gameObject.AddComponent<AkAudioListener>();
    }
}
by Adrien V. (160 points)
+1 vote
I fix this error in Unity by unchecking Project settings -> Editor -> Enter Play Mode Options. I believe this option speeds up starting play mode by not destroying some objects from the previous game start. Because of that, I have trouble loading sound banks on Awake and registering game objects with Wwise. I hope it helps.
by Sam M. (160 points)
This fixed it for me. Thank you!
...