FMOD Sequencer Command
Posted: Wed Nov 04, 2020 9:34 am
Discord user Nemesis Warlock shared a sequencer event FMODAudioEvent(uri) to play one-shot FMOD audio:
SequencerCommandFMODAudioEvent.cs
SequencerCommandFMODAudioEvent.cs
Code: Select all
using UnityEngine;
using System.Collections;
using PixelCrushers.DialogueSystem;
using FMODUnity;
namespace PixelCrushers.DialogueSystem.SequencerCommands
{
public class SequencerCommandFMODAudioEvent : SequencerCommand
{
public void Awake()
{
string FMODEvent = GetParameter(0);
if (!string.IsNullOrEmpty(FMODEvent))
{
RuntimeManager.PlayOneShot(FMODEvent);
Stop();
}
}
}
}