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.

A few questions about Unity Integration

0 votes

Hi,

I'm new to Wwise and to using it with Unity, and though I have gotten the integration to work, I'm still dealing with some loose ends and have a few questions:

 

  1. The base path. The Wwise documentation implies you set this in the AkGlobalSoundEngineInitializer basePath public ivar, which is exposed to the editor. However, I found that this variable is not really used. Instead, the path is hardcoded to /Audio/GeneratedSoundBanks in AkBankPath. I had to modify both scripts to actually look in the path that I set in the editor property. What's the deal with this? Just sloppyness or am I missing something?
  2. Also about paths: since I'm on Mac, I'm using Unity natively under OS X and in tadem, the Wwise authoring tool via VMWare and I share the OS X Unity project folder so I can generate the soundbanks into the assets folder. However, the authoring tool (downloaded the latest one for Windows) doesn't automatically generate any "platform-specific" subfolders for my wwise files. That is, again, the Unity integration scripts assume the path to be /Audio/GeneratedSoundBanks/<my-platform>/ which in my case would be Mac (I set the authoring tool to generate for Mac). The documentation says wwise will automatically generate the platform-specific folders but it just dumps all the stuff in GeneratedSoundBanks. Am I missing some setting? cause right now I just manually create the /Mac folder.
  3. The C# methods AkSoundEngine.PostEvent and AkSoundEngine.LoadBank for instance, have a few overloads, including ones where I can refer to the soundbanks or events by their ID. However, if I try to use these (say, AkSoundEngine.LoadBank(<unsigned int>, AkSoundEngine.AK_DEFAULT_POOL_ID), where the <unsigned int> I got from the .h header) I get Ak_Fail. If I use the overloads that reference the objects by string name then it works.
  4. The integration comes with a C# script that seems to fork a process to call Python in turn to covert the C++ header into a C# script. This always fails unless I manually execute the Python script myself from outside Unity. Might be a permissions thing, but has anyone experienced this?
  5. The Profiler: I set up the Unity player to run in the background and am using the "Profile" version of the plugin. However, when I start the Unity OS X standalone app, the profiler in VMWare does not see it. This I'm thinking might just be that I'm trying to see a running instance of the sound engine inside an OS X binary from a Windows virtual machine. But I'm just wondering if anyone has gotten the Windows profiler to see an OS X Unity binary. 
  6. About switching to the "Release" version of the plugin for relase builds: It's not clear to me from the documentation whether I have to manually (or write a script to do it) remove the "Profile" version and install the "Release" version when I'm going to do a Release build or if I should install both version in Unity and it'll select the right one.

Thanks!

asked Nov 17, 2013 in General Discussion by Federico S. (100 points)

1 Answer

0 votes

Hi,

I don't know about all these problems, but there you go:

1. Noticed the same thing with an older version of the unity integration, nowadays I don't bother fixing it, I just play it nice and put my banks in the default folder...

4. I had the same problem, and it seems it was related to unescaped spaces in my unity project's path. A friend of mine modified AkWiseIdConverter.cs and it seems to work ok now. The fix is to replace line 43 of the script to :

start.Arguments = string.Format("\"{0}\" \"{1}\"", m_converterScript, bankIdHeaderPath); // escaped spaces

Hope that helps :)

answered Nov 20, 2013 by Matthieu B. (780 points)
...