Unity Integration 2.03
The FMOD Studio Unity Integration exposes the full FMOD Core and Studio API's in C#.
The Studio API is used to playback and control events created in the FMOD Studio tool.
The Core API is for playing back sounds directly as well as advanced control of event playback.
The Runtime Manager API provides helpers for the most common operations in writing Unity game components that use FMOD Studio Events.
When the RuntimeManager initializes, it creates a StudioSystem and a CoreSystem. You can use any and/or all of these to access the API's.
var studioSystem = FMODUnity.RuntimeManager.StudioSystem;
FMOD.Studio.CPU_USAGE cpuUsage;
studioSystem.getCPUUsage(out cpuUsage);
var coreSystem = FMODUnity.RuntimeManager.CoreSystem;
uint version, buildnumber;
coreSystem.getVersion(out version, out buildnumber);
You can access the custom FMOD UI for picking events, banks and global parameters by using one of the following:
Use the EventReference type to hold a reference to an event.
public class EventReferenceTest : MonoBehaviour
{
public FMODUnity.EventReference MyEvent;
}
You will be presented with this UI:

Use the attribute "[FMODUnity.BankRef]" on any string property you are using to hold the path of a bank.
public class BankRefTest : MonoBehaviour
{
[FMODUnity.BankRef]
public string MyBank1;
}
You will be presented with this UI:

Use the attribute "[FMODUnity.ParamRef]" on any string property you are using to hold the path of a global parameter.
public class ParamRefTest : MonoBehaviour
{
[FMODUnity.ParamRef]
public string MyParam1;
}
You will be presented with this UI:
