menu
 

在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

–1 投票
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.
分类:General Discussion | 用户: Joel G. (190 分)
修改于 用户:Bernard R. (Audiokinetic)

1个回答

0 投票

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!

用户: Mathieu J. (Audiokinetic) (7.1k 分)
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?
...