menu
 

Audiokinetic의 커뮤니티 Q&A는 사용자가 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?
...