Unity3d - ios duplication method found with fmod

I am using the fmod plugin for Unity3D. Compiling on Windows and OSX is great because I can dynamically load the DLL / dylib. The problem occurs when I compile for iOS. I use

[DllImport("__Internal")]

Because iOS requires statically linked libraries. When I compile though I get

SystemException: Duplicate native method found : FMOD_System_CreateSound. Please check your source carefully.

I am sure that I am not duplicating a character. I think this may be due to the fact that Unity imports FMODs and what they may encounter ... But if so, I am surprised that FMOD_System_CreateSound is the first one to catch. Is there any way around this? THX!

As always, I will be happy to provide any additional details!

Here is an example project that will fail: Unity project example with FMOD

EDIT: The conflict was caused by the fact that iOS does not allow functions to have the same name, even if they do not have the same signature. After deleting the same functions (thus removing some FMOD functions that I do not need), I can compile iOS, but, as expected, I still get an error message during initialization, since FMOD is already initialized by Unity.

+5
source share
2 answers

As for your editing, and after viewing the sample, it is true that you cannot have two methods with the same name as the compiler does not recognize which link.

An easy solution is to obviously name them differently.

, FMOD, Unity 3D, .

, . , .

+1

Unity3d FMOD, , , . , , FMOD

+2

All Articles