This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy
The FMOD Studio Unity Integration is a Unity plugin which allows the use of FMOD in Unity games.
The Oculus Spatializer Plugin (OSP) for FMOD is compatible with FMOD Studio Unity Integration for projects targeting Windows (32/64 bit), OS X, and Android. Two versions of the FMOD Studio Unity Integration are currently available: 2.0 and Legacy. The OSP for FMOD is compatible with:
If you are migrating from the Legacy Integration, please follow FMOD’s migration guide here: http://www.fmod.org/documentation/#content/generated/engine_new_unity/migration.html
Otherwise, take the following steps:
You should now be able to load and play FMOD Events that use the OSP in your Unity application runtime.
foreach (var name in pluginPaths)
{
// OCULUS start
var path = pluginPath + "/";
if(name.Equals("ovrfmod") && (Application.platform == RuntimePlatform.OSXEditor ||
Application.platform == RuntimePlatform.OSXPlayer ||
Application.platform == RuntimePlatform.OSXDashboardPlayer) )
{
path += (name + ".bundle");
FMOD.Studio.UnityUtil.Log("Loading plugin: " + path);
}
else
{
path += GetPluginFileName(name);
FMOD.Studio.UnityUtil.Log("Loading plugin: " + path);
#if UNITY_5 && (UNITY_64 || UNITY_EDITOR_64)
if (!System.IO.File.Exists(path))
{
path = pluginPath + "/" + GetPluginFileName(name + "64");
}
#endif
#if !UNITY_METRO
if (!System.IO.File.Exists(path))
{
FMOD.Studio.UnityUtil.LogWarning("plugin not found: " + path);
}
#endif
}
// OCULUS end
uint handle;
FMOD.RESULT res = sys.loadPlugin(path, out handle);
ERRCHECK(res);
}Now you should be able to load and play FMOD Events that use the OSP in your Unity application runtime.