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.

my solution for Unity attenuation sphere issue

+6 votes

Hello,

I'm a french technical sound designer using WWise with Unity.

It has been a long time there is a problem to display attenuation sphere in Unity.

I decided to correct the issue myself in the WWise - Unity API.  Here is How to do:


Issue Description

If you load a AkAmbient component in your Unity project, you would normally be able to see attenuation sphere when you choose to "show attenuation sphere" in "current event only" or "all events" modes.

In some cases, the attenuation spheres are not displayed (especially if you work on french work stations).


My Solution

First, you have to check in your Wwise project that you selected "generate XML metadata" and "Max attenuation":

Then the max attenuation distance will be able to be exported in XML data to be read by UNity-Wwise API.

In fact the WWise APi try to read an XML value with a dot to express max distance (ex: "10.50"). In some languages like French, this value would have to be expressed with a comma (like "10,50"), and not with a dot. So the XML reader script fail to understand “10.50".

- First solution (not tested, tell me if it's working on your PC): Switch the Windows local language to English (US).

- My solution that works (tested ok):

I corrected the script of the XML reader class in WWise Unity API, in a way that the XML parser can understand international naming convention with dots.

You can replace AkWwiseXMLBuilder.cs file in you want to see attenuation spheres in the following folder: “MyUnityProject\Assets\Wwise\Editor\WwiseWindows”

new AkWwiseXMLBuilder.cs script to download here.

If you do not want to copy this file each time you create a project, you will have to integrate Wwise using Offline WWise Api, in the Wwise launcher.

Then locate the downloaded archive in Wwise install folder (named Unity.Windows.tar.xyz).

You will finally have to replace in this archive the AkWwiseXMLBuilder.cs file by the new one.

In that way, each time you integrate Wwise in a new Unity project, the right cs file will be automatically copied.

asked Feb 19, 2021 in General Discussion by thibault b. (160 points)

3 Answers

+3 votes
Hello,
Thank you so much!
We also had this issue on french systems too.
Once the fix applied it worked after generating wwise soundbanks.
This fix needs to be in the newer versions of Wwise. I will ask the support about it.
answered May 23, 2021 by Adrien V. (340 points)
0 votes
Bonjour Thibault,

Je vous confirme que la première solution en changeant la langue locale de mon Mac fonctionne, cependant je n'ai pas réussi à faire fonctionner le script corrigé que vous proposez. Après avoir remplacé le fichier AkWwiseXMLBuilder.Cs, plus rien ne fonctionnait. Le script n'est pas reconnu sur ma version de Unity.

Je suis sur Unity 2018.4.32 avec le Wwise Adventure Game 2019.1.11. pour la certification Wwise 301.

Mais je suis déjà content d'avoir cette solution de changement de langage et vous remercie !
answered Sep 6, 2021 by lylian k. (140 points)
0 votes
Hi,

I am following the 301 certificate with the WAG using Wwise 2019.1.11 and Unity 2018.4.32.f1 on Windows.

I tried A LOT of different things, but this was the one that fixed the issue. Changing the system language from danish to english made the attenuation spheres appear.

Thank you so much for writing out a solution!
answered Jun 29, 2023 by Emil B. (140 points)
...