社区问答

欢迎来到 Audiokinetic 社区问答论坛。在此,Wwise 和 Strata 用户可互帮互助。如需我们团队直接提供协助,请前往技术支持申请单页面。若要报告问题,请在 Audiokinetic Launcher 中选择“报告错误”选项(注意,问答论坛并不会接收错误报告)。我们内部设有专门的错误报告系统,会有专人查看报告并设法解决问题。

要想尽快得到满意的解答,请在提问时注意以下几点:

  • 描述尽量具体:比如,想达到什么样的目的,或者具体哪里有问题。
  • 包含关键细节:比如,Wwise 和游戏引擎版本以及所用操作系统等等。
  • 阐明所做努力:阐明自己为了排除故障都采取了哪些措施。
  • 聚焦问题本身:聚焦于问题本身的相关技术细节,以便别人可以快速找到解决方案。

+1 投票

I wanted to get the volume of sounds played in my unity scene from a wwise meter via output game parameter i called "volume". So i created a wwise Meter effect on my sounds and i created a script on each gameobject that plays those sounds in unity with those lines :

 

int type = (int)RTPCValue_type.RTPCValue_GameObject ;
AkSoundEngine.GetRTPCValue("Volume", gameObject, out volume, ref type) ;
 
 
Unfortunatly the RTPC "Volume" still seems to be global, as even if no sounds are played by the gameobject containing those script lines, the output value "volume" get the RTPC "Volume" number when other sounds containing the wwise meter effect are playing on other gameObjects ...
 
It s like the "RTPCValue_GameObject" would be the same as "RTPCValue_Global" 
 
Any helps ? :)
 
EDIT : Debug.Log(type) returns 1 (which should correspond to "RTPCValue_Global"
 
 
 
分类:General Discussion | 用户: Florent D. (470 分)
修改于 用户:Florent D.

5 个回答

+1 投票
I'd love to get an answer as well.

Thanks!
用户: Jean-Edouard M. (370 分)
+1 投票
Well I can answer you jean-Edouard.

It's not a bug, it is just not implemented, the RTPC attached to Meters are global. The only solution we found here is to create one unique RTPC per gameObject. It's a bit annoying but works well...

 

Cheers
用户: Florent D. (470 分)
+1 投票
0 投票

you have to define the in_playingID, try this:

        int type = (int)RTPCValue_type.RTPCValue_GameObject;

        uint pid = (uint)RTPCValue_type.RTPCValue_PlayingID;

 

 

        AkSoundEngine.GetRTPCValue("Volume", this.gameObject, pid, out volume, ref type);

 

then just debug volume ;)

 

用户: Ratko F. (290 分)
0 投票

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RTPCListener : MonoBehaviour {


    //set your RTPCID to the name of your desired gameparameter (under GameSyncs)
    public string rtpcID;

    // Update is called once per frame
    void Update () {

        // RTPCValue_type.RTPCValue_Global
        // for whatever reason, this constant isn't exposed by name by WWise C#/Unity headers
        int type = 1;

        // will contain the value of the RTPC parameter after the GetRTPCValue call
        float value;

        // retrieves current value of the RTPC parameter and stores it in 'value'
        AkSoundEngine.GetRTPCValue( rtpcID, gameObject, 0, out value, ref type );

        //
        // use 'value' here
        //
        // e.g. transform.localScale += Vector3( value, 0, 0 );
        // which would scale by the value of the RTPC parameter
}

用户: Kristina W. (490 分)
...