Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. Contact Sales if your project requires a support plan.

BUG in 2017.2.1 regarding akEvent durations

0 votes

Using Wwise 2017.2.1, with Unity 2017.3.0f3 and Wwise Integration 2017.2.1


For some reason my XML outputs duration of an event with a comma as decimal separator. This means a line in the SoundbanksInfo.xml looks like this eg.

<Event Id="2647152250" Name="SZ_AR_bas_l" ObjectPath="\Events\Default Work Unit\SZ_AR_bas_l" MaxAttenuation="20,000000" DurationType="OneShot" DurationMin="567,240967" DurationMax="567,240967"/>

I'm on a Danish machine so that might create a faulty XML file. Either way this screws up when using the Unity Timeline AkEvents, as these pull the durations of the XML files. When the decimal separator is a comma and not a period, then the parsing to float goes wrong.

A temporary fix for me in AkEventPlayable.cs is to change

result.MaxDuration = float.Parse(events[e].Attributes["DurationMax"].InnerText;



string formattedString = events[e].Attributes["DurationMax"].InnerText.Replace(",", ".");
result.MaxDuration = float.Parse(formattedString);

asked Feb 13, 2018 in General Discussion by Egil S. (640 points)

Please sign-in or register to answer this question.