menu
 

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

0 投票

Hello all. I've been working on replacing all the audio in the 3d Game Kit through Wwise integration and am fairly new to coding. I am working on the sounds of an energy grenade exploding and bouncing. In the original script for the grenade they declare 2 RandomAudioPlayers:

public RandomAudioPlayer explosionPlayer;

public RandomAudioPlayer bouncePlayer;

Then later in the script the Explosion function starts of like this:

public void Explosion() {

if (explosionPlayer) {

explosionPlayer.transform.SetParent(null);

explosionPlayer.PlayRandomClip();

} .....

I am attempting to replace these lines as follows, first I declare 3 things at the beginning:

public AK.Wwise.Event aKExplosion;

public AK.Wwise.Event aKBounce;

private AkGameObj grenadeLocation;

Then later I replace the original lines in the function with:

public void Explosion() {

if (grenadeLocation) {

grenadeLocation.transform.SetParent(null);

aKExplosion.Post(gameObject);

} .....

I'm not getting any errors in the script but also no sound from the explosion... I'm not sure AkGameObject is the correct class to use here but so far I have not come up with any better ideas and have hit a wall. Any help or suggestions would be greatly appreciated. Also let me know if I should elaborate on any aspect. Thanks!!

分类:General Discussion | 用户: Jon S. (100 分)

Please sign-in or register to answer this question.

...