Thankyou for getting this unity integration package out. It is going to be very useful.
I’m working through the process using example scripts and I need a pointer please.
I have successfully built banks, exported GUID.text in FMOD.
Refreshed the FMOD event list in Unity and added a FMOD_StudioEventEmitter to an object in Unity
it is the next step that is a block . How do I assign the event? I know where to locate it, I have imported the entire FMOD project to the Unity assets folder.
I have tried dragging the event to the public variable .. this didn’t work
I have tried writing in the path in the script.. but wasn’t successful here.
if you could be specific about how to assign the event I would really appreciate it.
- AmC asked 4 years ago
You should be able to drag the event from inside the FMODAsset directory in"Project" hierarchy inside Unity onto the Asset field of the FMOD_StudioEventEmitter component. The only other thing you need is to add a FMOD_Listener component to the camera.[/quote:34rdpnq0]
OK i admit, Peter, i am also a little stymied here. everything seemed pretty logical but i’m not sure what the EventEmitter script is looking for. there isn’t an FMODAsset directory in the FMOD Studio project or the Unity Project (there is a FMODAsset script in the Unity project, but no folder), and it’s unclear to me where the FMODAsset is residing. i have tried dragging over the the Event GUID that was in the Events folder in the FMOD Studio project, as well as dragging the Events folder and the GUID.txt file but it doesn’t recognize any of these.
i think a bit more specific assistance is needed. you need to differentiate between the Unity project folder paths and and the FMOD Studio folder paths in these instructions.
EDIT: to add to this, it does appear that i have no folder under the Unity project’s Assets folder called FMODAsset, which means that i either don’t have the latest version of the Integration, or there’s an issue creating the folder. just FYI this is on a Mac with 10.8, Unity 4.2.1 and the latest FMOD Studio.
any help appreciated,
ok . so i’ve just checked two FMOD studio projects.
one only has one event added .. a stereo loop, for testing the integration with Unity.
In the FMODStudio project: The banks folder info is 4k, the audio asset folder is 1.6MB, the audio bin folder is 1k, the Events folder is 12 k.
small because all I want to do is test the link.
I’ve tested a slightly larger project… one that includes 2 stereo loops, parameters, scatterer sound and and audio weather module.
In the FMODStudio project: the banks folder info is 2k, the audio asset folder is 10.1MB, the audio bin folder is 26k, the Events folder is 89k
in both the procedure in Unity has been the same
create new project, import new package (fmodstudio 10209.unitypackage)
add a FMOD Listener to the main camera
add an empty game object, add an FMOD Event Emitter to it.
Refresh the Event list, locate the GUIDs.txt The alert box is .. FMOD Studio Importer will modify Master Bank.bank(added) Master Bank.bank.strings (added)
on the smaller project there is no error message and the Streaming Assets folder is then created, but no FMOD Asset folder
on the larger project there IS and error message ..StreamingAssets/Master Bank.bank ERR_PLUGIN_MISSING
the Streaming Assets is created, but no FMODAsset folder
hope that explains a bit more clearly.
UPDATE: i managed to get this to work, at least up to the point where the Asset is recognized by the EventEmitter Script. it turns out the project requires a StreamingAssets folder to be present under Assets. not sure why, but once i added this folder the FMODAssets folder and the included Events were able to be created. it was not able to be created otherwise, so it might be useful in the integration to check if the folder is present and create it if it’s not.
i’m still not sure how to trigger the event itself from a Unity script, but hopefully someone can point out some options. any help appreciated!
That indicates that there is an event using a plugin which is not loaded. If you’re just trying to import the project you probably want to remove any plugins from the event or mixer so that it can be loaded inside Unity. If you do want to use Plugin Effects like "Distance Filter", and "ML1 Limiter", or Plugin Sounds like "AudioWeather", loading these plugins involves a couple of additional steps, that currently isn’t covered by the documentation. I would recommend loading the project without effect first just to keep things simple, but I will add instructions for loading plugins:
The FMOD Plugin Effects like Distance Filter and Gain are free, the third party effects like the ML1 Limiter and AudioWeather have to be licensed separately.There is licensing information available on the sales page: http://184.108.40.206/sales/
To load the plugins using Unity you add the plugin to the FMOD_Listener’s plugin list. Then just copy the plugin file into appropriate subdirectory of the Assets/Plugins directory (inside your Unity project) for the platform you are targeting. For Windows 32-bit it would be /Assets/Plugins/x86. The directory for each platform is listed here: http://wiki.unity3d.com/index.php/Speci … er#Plugins
(It should be next to the fmod_studio native plugin for that platform)
To get the free FMOD plugins, you can copy the files inside the /Plugins directory where FMOD Studio is installed.
Thanks for the quick response Peter.
and thanks for the info regarding where the FMOD Studio project is stored .. ie, not in the Unity assets.
So .. I created a new Unity project without any FMOD studio project stored in Assets.
When I Refresh Event List in Unity a StreamingAssets folder is definitely created, but no FMODAssets is created (this is the reason I manually created it originally)
Exactly where is this FMODAssets folder supposed to be created? .. there are no .asset files to drag to the EventEmitter on my game object.
All that is visible is the .bank files in the StreamingAssets folder
I’m on mac. Is this maybe the issue?
I checked the integration and it should already create the StreamingAssets directory if it does not already exist. I tested this on Windows and OSX with a completely empty Unity project and it worked on both for me. Is there anything else special about your set up? i.e. any read/write permissions that might prevent the script creating folders inside your unity project?
I seem to be having a similar issue here.
I have an fmod studio project with 1 basic event that I am trying to intergrate as a test project.
I have followed all your instructions but I do not have a FMODAsset directory in my unity project, only an FMODAsset script file which contains the text:
public class FMODAsset : ScriptableObject
public string path;
public string id; // Note: variable name ‘guid’ is not allowed in Unity
The intergration created a streaming assets folder already but I still cannot see my FMOD studio event.
I have attached the FMOD_listener script to the main camera and the FMOD_StudioEventEmitter to an object.
I am running FMOD studio and Unity (free version) on my Mac if that changes anything??
I see that metaphysician succeeded in adding the FMOD Studio event to the Asset variable in the FMOD_StudioEventEmitter.
Can you let me know how you did this ..
every time I try dragging the Event (stored in FMODAssets>MyFMODStudioProject>Events ) it is not recognised by the FMOD_StudioEventEmitter.
There is a Streaming Assets folder in my Unity project because it was created when I refreshed the Event List in Unity.
I also manually created an FMODAssets folder to store my FMOD studio project.
Am I doing something really wrong here?
all help gratefully received.
[quote:1ivbck23]I am running FMOD studio and Unity (free version) on my Mac if that changes anything??[/quote:1ivbck23]
The integration requires native plugin support which is available for iOS and Android in the free version but requires Pro if you are targeting Mac standalone.
Are you seeing any errors in the Unity console when you import? Do you have the latest version of the integration 1.02.05?
[quote:zy8k2fkq]I also manually created an FMODAssets folder to store my FMOD studio project.[/quote:zy8k2fkq]
That sounds wrong, the FMOD Studio project (.fspro) should [b:zy8k2fkq]not [/b:zy8k2fkq]be inside the Unity Assets folder.
Here are the instructions as listed in the announcement thread:
Inside FMOD Studio:
Assign your Events to banks.
Build all banks (File -> Build…)
Export GUIDs.txt (File -> Export GUIDs…)
- FMOD -> Refresh Event List
select the GUIDs.txt generated from the previous step (inside the /Builds folder of your FMOD Studio project)[/quote:zy8k2fkq]
Once you have completed those steps the integration will automatically create the FMODAssets folder and create .asset files representing each event in the banks that were imported. Those .asset files can be dragged onto the FMOD_Studio_EventEmitter.
We plan on making an integration video to demonstrate the process and explain the process in a bit more detail.
Thanks for your quick reply!
I am not getting any error messages, however the problem seems to be with my FMOD project as I tested it with the example project and it worked fine. So just a bit of tweaking should have it working.
I am very new to FMOD and Unity, so I appreciate your help.
Once I have my events intergrated into unity, I then control them through Unity via scripting correct?
There are a few ways to play your events but scripts are usually the best way to go except for simple things. If you attach an FMOD_StudioEventEmitter component you can assign the an FMOD Asset to the emitter and it will just play forever, this is useful for long/looping sounds, it will update the event’s 3D position in FMOD automatically inside Update().
There are some handy helper functions on the FMOD_StudioSystem:
for simple short sounds, gun shots, impacts, etc.
if you want to hold on to the FMOD event, for more control like setting the game parameter values
As a complete beginner, can you put me in the right direction for learning the basics of controlling FMOD via scripting?
There seems to be lots of great tutorials for working within FMOD, but none that show you how to implement them into a gaming engine unfortunately.
You should be able to drag the event from inside the FMODAsset directory in"Project" hierarchy inside Unity onto the Asset field of the FMOD_StudioEventEmitter component. The only other thing you need is to add a FMOD_Listener component to the camera.
Please login first to submit.