Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

–1 vote
Trying to figure out how to translate this info into C# so that we can use event callbacks with the Unity Integration:  http://kb.gowwise.com/questions/174/How+can+I+be+notified+when+an+event+has+finished+playing%3F

If anyone has an example of how to use them, that would be rad.  Essentially I'm just trying to find out when an event has finished and use that to trigger further actions.
dans General Discussion par Joel G. (190 points)
edité par Bernard R. (Audiokinetic)

1 Réponse

0 votes

There is an example of using a callback in the Unity Integration Demo project.  Check the MarkerCallback scene.  But in short, it works the same way as in C++.  For example:

AkSoundEngine.PostEvent("MyEvent", gameObject, AK_EndOfEvent, MyCallbackFunction, myCookieObject);

void MyCallbackFunction(object in_cookie, AkCallbackType in_type, object in_info)

{

if (in_type == AK_EndOfEvent)

{

   AkEventCallbackInfo info = (AkEventCallbackInfo)in_info; //Then do stuff.

}

}

You can find more info in the Unity doc that comes in the Unity package, or in the AkCallbackManager class, or in the SDK doc (comes with the Wwise installation).  Also note we have another Unity demo project for the 2014.1 version that also demonstrate the use of callbacks.  Check it out!

par Mathieu J. (Audiokinetic) (7.1k points)
Thanks for the reply Mathieu, we have it working now :)
uint instead of AkCallBackType in Unity
I see the subtitle demo in the "Wwise Unity 5 Demo Scene" but I don't see a MakerCallback scene or a Unity Integration Demo anywhere. Am I missing it? Do any of these Unity integration demonstrate Midi callbacks?
...