Hi everybody,
For a musical game developped with Unity3D, I have a background music (used to define the beat) and I need to have some short sequences (a few seconds) launched randomly on the beat.
Those sequences must be synchronized with background music, so I'm using Stinger in Wwise to do launch the sequence on next beat.
OK, It is working fine...except that in Unity, I cannot use events callbackswith posttrigger (so, I cannot know if and when the sequence start playing, the source position, neither the end of the sequence).
It's problematic for me, because each sequence is a short gameplay phase, and I really need this information to be accurate.
I tried to extrapolate those information (on the assumption that next beat corresponds to sequence starting time), but :
1) it is not very accurate and can lead to bugs and errors
2) I need to enter manually custom cues and sequence duration times in Unity...I have a lot of sequence, so it can be fastidious and an errors source
Is there a way to use callbacks (or tho have information about sequences played) with stingers / post triggers ?
I also tried another approach : listening AkCallbackType.AK_MusicSyncBeat events on the background music, and posting the sequence event on the next beat via Unity.
But I'm afraid to encounter synchronization problem with this method...do you think it can be the case ?
Else, would you have a third solution to do this (have a sequence synchronized on background music, and be able to recover playing information, including custom cues) ?
Many thanks in advance for your help