社区问答

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

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

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

0 投票
I am pretty new to wwise & unity integration and I am unable to figure something out. I get that there is Ak Timeline Event Track & Ak Timeline RTPC Track, but how am I supposed to set some switches? For example: I've got an Impact event that works with couple of switches (weapon type, surface type etc.) so I guess it would be convenient to set those up on a timeline track to post an event when all the switches are set up properly. I know that I probably can workaround this by using timeline signals and setting AkSwitch manually but it seems really tedious.

I would really appreciate any hints about that.
分类:General Discussion | 用户: nehvaleem (140 分)

1个回答

0 投票

Hey nehvaleem, yeah timeline signals kind of suck. "Markers" are really the way to go, but you have to learn how to set them up. 

Here is an example for a Wwise Switch - I haven't tested it out, but I think it should work (we don't really use Switches in our project so don't have anything to test it on easily). With Markers, you can use "Exposed References" to link up to stuff that exists in your current Scene (the "exposed audio source game object"):

using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;

[CustomStyle("WirelessSignal")]  //<-------Use this to create a custom icon for the Marker, see below
public class Marker_AudioSwitch : Marker, INotification
{

    public PropertyName id => new PropertyName();

    public AK.Wwise.Switch akSwitch;
    [SerializeField] public ExposedReference<GameObject> exposedAudioSourceGameObject;

    public void Activate(Playable origin) {
        GameObject resolvedAudioSourceGameObject = exposedAudioSourceGameObject.Resolve(origin.GetGraph().GetResolver());
        akSwitch.SetValue(resolvedAudioSourceGameObject);
    }
}

 

To use a custom icon for the Marker you have to set up a file called "common.uss". I can't remember exactly, but you may have to place the common.uss file inside of a folder structure like this:

Editor > StyleSheets > common.uss

Then here is an example of what would be inside of the common.uss file, in order to set up one icon (they can have different versions for "hover" and "checked" etc, so that when you click on it it changes color, or whatever you want it to do:


WirelessSignal
{
    width: 20px;
    height: 20px;
    background-image: resource("Assets/Cutscene/Editor/WirelessSignal - dark.png");
}
 
WirelessSignal:checked
{
    width: 20px;
    height: 20px;
    background-image: resource("Assets/Cutscene/Editor/WirelessSignal - dark.png");
}
 
WirelessSignal:hover:focus:checked
{
    width: 20px;
    height: 20px;
    background-image: resource("Assets/Cutscene/Editor/WirelessSignal.png");

}
 

And then place the images you want for the icon at those locations (like how mine is assets/cutscene/Editor). I think the icons need to be in a folder called "Editor".

Hope this helps!

用户: James M. (800 分)
...