It seems FMOD is looking at an fmod.dll and fmodstudio.dll that was added before I even joined the studio. Deleting these causes a DLL Not Found and adding any fmod.dll that was added with the custom package still gives a DLL Not Found Error.
How is it not getting a file with the same name? Yes, the version numbers are different but you’d think it’d accept the most recent from Firelight.
I’m not sure on the answer to your first question as I’m just letting FMOD set itself up. However, I can tell you that RuntimeUtils and EventManager are calling FMOD.Memory.GetStats and then accessing the DLL. It also seems to be the other DLL imports as when changing the code from getting the DLL, to just return FMOD.RESULT.OK, it still gives a DLL error.
To your second question, the FMOD code and FMOD DLL’s are part of the a Class Library (.NET Framework) so there is no source code within Unity; it is all built through the DLL now. I did use the Unity intergration to get all the code and DLL’s but moved it to the VS solution.
Yes, the DLL’s that are needed (I’ve actually left all of them for now) are in Unity’s /Plugins folder as they were imported. All the .meta files are there. Visual Studio also has these DLL files in the solution.
I’ve just tried copying the DLL’s in VS to the output directory with no luck there.
Okay, I’ve got it to find one of the DLL’s by using #define to specifically say what platform I’m on. But now it’s giving an Invalid Handle and Parameter error that’s mostly coming from the EditorUtils
Are you including the FMOD dll’s for the required platform/s to your Unity project?
As well as setting up the meta files/plugin settings in Unity.
The wrapper files will be trying to access the unmanaged FMOD libs which we only need to declare the name of and Unity will find, using the meta files to find in editor and a plugins folder in a build.
So I’ve made progress! I’m using the runtime DLL for FMOD and I’ve now got sound in my game.
I get the ‘ERR_PLUGIN_MISSING’ error (as I’m using the distance filter) but adding the DLL to 86_64 and adding it to the settings causes ‘Studio Initialization Failed: Loading plugin ‘fmod_distance_filter’ ERR_INVALID_PARAMETER’.
I’m not sure why that’s an error but if I can’t get rid of it then I’m going to just not use that plugin as all I want is to get it to work again, and start using FMOD.