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.

0 votes
Hi

I integrated Wwise with My unity projects and I have an issue with the sound on 2D projects.. The sound works perfectly on 3D projects, but nothing can be heard when I load a 2D project.
On 'AkEvent/trigger on'  if i change that to "start" i can hear the sound at the beginning of my scene but if i go back to AkTriggerCollisionEnter nothing happens. Please note, that I do have a  2d collider on my object.

Any ideas?

Thanks

Petros
in General Discussion by Petros K. (130 points)

1 Answer

0 votes
 
Best answer

Hi Petros, 

The Wwise Unity Integration is primarily built for 3D projects, and so "Start" will also work with 2D as it's the same function in 3D.
However, the AkTriggerCollisionEnter script (AkTriggerCollisionEnter option) is based on the OnTriggerEnter and OnCollisionEnter unity functions. You will need the script to be based on the e.g. OnCollisionEnter2D function instead.

Long story short, I'd suggest you do one of the following...
1. Open the AkTriggerCollisionEnter script and modify the code to use the 2D functions.
2. Make an entirely new script for e.g. posting the sound inside an OnCollisionEnter2D function.
3. Add 3D components to your game objects as well. This seems like the least preferable option, as you'll need to manage both types of components in the long run. 

For learning how to post events from a unity script, refer to the Wwise-301 course
Let us know if this helps!

by Mads Maretty S. (Audiokinetic) (40.2k points)
...