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.

Parsing WWU in Unity takes hours, with requested fix

0 votes

Hello,

We use WAAPI to generate dialogue events for our Unity game. Our game has around 12,000 lines of dialogue.

Let me first explain an odd WAAPI limitation we ran into: There seems to be no way to clear out the Actions set to an Event and add the one you want without replacing the event entirely...

  • If we use the "event" field in ak.wwise.core.audio.import, it ADDS an action to that event rather than replacing it.
  • We cannot access the "@Action" field of an event during ak.wwise.core.object.create, unless we use a different JSON serializer rather than JsonUtility, since JsonUtility will ignore the @ symbol in the serialization.
    • Even if we could, I'm not sure what the functionality would be. Would this add an action or replace the Action set with the ones I specified?
  • Thus, we had to overwrite all generated events with no Actions, then set the action at the import step using the event field. Remember, that's 12,000 events that get assigned a different GUID.

If you have any pointers in getting around this, please let us know!

 

BUT:

 

The biggest issue this causes the WWU parsing step to take 1-5 HOURS after the Wwise events have been generated. This is killing productivity for everyone who uses Unity at the studio.

 

I narrowed it down to one line of code in the Unity plugin, in WwiseObjectReference.cs line 128 via AkWwiseBuilder.cs line 583: The plugin uses AssetDatabase.DeleteAsset() for ALL of these 12,000 "removed" event reference objects. This takes 0.25 - 1 second each.

 

Fortunately for us, we don't actually use the Unity reference for any of our VO; we call it all directly through AkSoundEngine.PostEvent(). This means that these reference objects didn't actually exist!

 

My optimization is as follows, which I hope can make it into the next Unity plugin update:

if (UnityEditor.AssetDatabase.LoadAssetAtPath<WwiseObjectReference>(path) != null)

{

    UnityEditor.AssetDatabase.DeleteAsset(path);

}

LoadAssetAtPath is hundreds or even thousands of times faster than DeleteAsset, so this saved a TON of parsing time.

 

I'd also like to reiterate from my other post (which has not yet been answered) that the event reference objects are causing us a ton of problems: https://www.audiokinetic.com/qa/5516/unity-integration-2018-1-4-update-causing-massive-problems

 

Thank you, and I hope this is looked into soon.

 

Best,

Bryant

asked Feb 6, 2019 in General Discussion by Bryant C. (150 points)

Please sign-in or register to answer this question.

...