Skip to content

Instantly share code, notes, and snippets.

@fmod-nick
fmod-nick / stopall.cs
Last active January 19, 2016 07:18
Stop All Events on a Bus
//--------------------------------------------------------------------
// 12: This section shows how to retrieve a bus, and how busses can be
// used to control multiple events.
//--------------------------------------------------------------------
void StopAllPlayerEvents()
{
FMOD.Studio.Bus playerBus = FMODUnity.RuntimeManager.GetBus("bus:/player");
playerBus.stopAllEvents(FMOD.Studio.STOP_MODE.IMMEDIATE);
}
@fmod-nick
fmod-nick / fmod_studio.cs
Created February 4, 2016 23:33
Work around Unity 5.3.2p2 issues
/* ========================================================================================== */
/* FMOD System - C# Wrapper . Copyright (c), Firelight Technologies Pty, Ltd. 2004-2016. */
/* */
/* */
/* ========================================================================================== */
using System;
using System.Text;
using System.Runtime.InteropServices;
@fmod-nick
fmod-nick / gist:4e452d142c427d541553
Last active February 9, 2016 06:25
ParamRef attribute prototype
[FMODUnity.EventRef]
public string TestEvent;
[FMODUnity.ParamRef(EventRef = "TestEvent")]
public FMODUnity.ParamRef param;
@fmod-nick
fmod-nick / DelayedStart.cs
Last active March 7, 2016 02:54
Delayed Event Start
using System;
using System.Collections;
using UnityEngine;
class DelayedStart : MonoBehaviour
{
FMOD.Studio.EventInstance instance;
[FMODUnity.EventRef]
public string Event;