squaretangle projects

FMODUnity .NET Plugin

SquareTangle FMOD plugin for Unity.

This .NET plugin allows FMOD to be used from within Unity. FMOD is a library and toolkit for the creation and playback of interactive audio, widely used in the games industry. Unity is a multiplatform game development tool. This plugin allows sound designers to use the FMOD Designer tool to create sophisticated interactive audio designs which will work in Unity. See the FMOD and Unity sites for full details.

We have released this plugin free and open source under the MIT license. You may use this plugin in your own projects free of charge in accordance with the MIT license, which allows anybody to use the software without restriction. See below or see the LICENSE.txt file for full details of the license. Please see the FMOD and Unity licenses separately for details on their usage in your projects. FMOD license details are here www.fmod.org/sales FMOD is free for non-commercial use.

FMODUnity is a .NET Assembly and will work with both Indie and Pro versions of Unity on Mac and Win desktops.

FMODUnity.dll has been tested with both the Indie and Pro versions of Unity 2.5 on both Mac and Windows. It works with the low level FMOD_Ex as well as the FMOD_Event systems. Currently supported FMOD versions are 4.24 and 4.26.

Usage

Place FMODUnity.dll in your Assets/Plugins folder.

Place fmodex.dll, fmod_event.dll, libfmodex.dylib and libfmod_event.dylib in the root folder of your Unity project.

If you have downloaded the FMODUnity_Demo.zip example unity project look at the FMOD_Ex_Test.unity or FMOD_Event_Test.unity scenes. Example Unity C# scripts for both the Ex and Event system are in the Assets/FMOD folder. The examples are translations of the playsound and simple_event examples from the FMOD API.

Download

You can download the demo project containing the FMODUnity plugin:
  • FMODUnity_Demo for FMOD 4.24 (~8Mb)
  • FMODUnity_Demo for FMOD 4.26 (~8Mb)
Or you can download just the required libraries:
  • FMODUnity_DLL for FMOD 4.24(~1.4Mb)
  • FMODUnity_DLL for FMOD 4.26(~1.4Mb)
Or you can download just the source files. These are Visual Studio 2005 solutions, mainly because the Windows version of FMOD comes with a C# interface and also because it was easier to write the plugin so we can explicitly tell windows where to find the correct libraries and then let Mac Mono find the correct dylibs for Mac. See the "Library Names" section in this link: Interop_with_Native_Libraries for details on cross platform library interop. The Windows version of the FMOD Programmer's API is also the best place to look for details of how to access FMOD Ex and Event system using C#. Examples in the demo projects linked above illustrate how to convert the FMOD C# examples for use within Unity:
  • FMODUnity_Source_for FMOD 4.24(~0.5Mb)
  • FMODUnity_Source_for FMOD 4.26(~0.5Mb)
We hope you find this plugin useful and enjoyable. If you have any questions, comments or feedback, please put them in the comments on this FMODUnity Plugin blog post

Donate

If you find the FMODUnity plugin useful or even profitable then you might like to make a donation to the SquareTangle Fund. Part of any donations will go towards web hosting upkeep and plugin development, the rest will go to our favourite charities. Our current preferred charity is Medicins Sans Frontieres (Doctors Without Borders).

You can make a donation to the SquareTangle Fund using the paypal donate button below

 

License

The MIT License.

FMODUnity. Copyright (c) 2009 SquareTangle.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.