Answered
1
0

Hallo Everyone,

We are working on a 2d platformer, and decided to used Fmod for our sound and music. Getting it working in unity was not that hard but now ive ran into some DLL problems when building my solution. In unity it all works fine but i can not get it to work when building.

it keeps giving me the message that it can not load the “fmodstudiol.dll”, ive checked all the folders for the correct files, made sure they were the correct 32/64 bit DLL’s (both builds did not work). and also placed my dll’s that are used in editor in the plugins folder but it stil cant find or load the DLL.

Fallback handler could not load library C:/Users/XX/Documents/Unity/build_folder/data_folder/Mono/.\C:/Users/XX/Documents/Unity/build_folder/data_folder/Plugins/fmodstudiol.dll
Fallback handler could not load library C:/Users/XX/Documents/Unity/build_folder/data_folder/Mono/.\C:/Users/XX/Documents/Unity/build_folder/data_folder/Plugins/fmodstudiol
Fallback handler could not load library C:/Users/XX/Documents/Unity/build_folder/data_folder/Mono/libC:/Users/XX/Documents/Unity/build_folder/data_folder/Plugins/fmodstudiol.dll
Fallback handler could not load library C:/Users/XX/Documents/Unity/build_folder/data_folder/Mono/.\libC:/Users/XX/Documents/Unity/build_folder/data_folder/Plugins/fmodstudiol.dll
Fallback handler could not load library C:/Users/XX/Documents/Unity/build_folder/data_folder/Mono/libC:/Users/XX/Documents/Unity/build_folder/data_folder/Plugins/fmodstudiol.dll
FMOD Studio: Creating runtime system instance
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
FMODUnity.RuntimeManager:Initialiase(Boolean) (at C:\Users\XX\Documents\Unity\editor_game_folder\game_name\Assets\Plugins\FMOD\RuntimeManager.cs:153)
FMODUnity.RuntimeManager:get_Instance() (at C:\Users\XX\Documents\Unity\editor_game_folder\game_name\Assets\Plugins\FMOD\RuntimeManager.cs:78)
FMODUnity.RuntimeManager:SetListenerLocation(GameObject, Rigidbody) (at C:\Users\XX\Documents\Unity\editor_game_folder\game_name\Assets\Plugins\FMOD\RuntimeManager.cs:582)
FMODUnity.StudioListener:OnEnable() (at C:\Users\XX\Documents\Unity\editor_game_folder\game_name\Assets\Plugins\FMOD\StudioListener.cs:17)

DllNotFoundException: C:/Users/XX/Documents/Unity/DLL test reimpoted assets/game_Build/Plugins/fmodstudiol.dll
at (wrapper managed-to-native) FMOD.Studio.EventInstance:FMOD_Studio_EventInstance_Set3DAttributes (intptr,FMOD.ATTRIBUTES_3D&)
at FMOD.Studio.EventInstance.set3DAttributes (ATTRIBUTES_3D attributes) [0x00000] in C:\Users\XX\Documents\Unity\editor_Folder\Game_name\Assets\Plugins\FMOD\Wrapper\fmod_studio.cs:1356
at GameManager+c__Iterator6.MoveNext () [0x000d8] in C:\Users\XX\Documents\Unity\editor_Folder\Game_name\Assets\Scripts\Misc\GameManager.cs

Ive been googling some solution’s for this problem but have yet to find a working one.

http://www.fmod.org/questions/question/fmod-unity-integration-1-07-03-fails-on-windows-build/ this site said to add delay to fmod scrypt and also a few seconds delay on the start() functions using fmod. ive done this to a few scrypts and disabled all others but this did not work for me.

The solution some people suggested to turn on “script debugging” and “developer mode” seemed to work (for some reason) but this is not acceptable for us for a finished build we can use. Reason for this is that this project is commissioned by another party that expects a normal build.

have not done that much special things with Fmod, we have no looping music yet only sounds and event sounds in 3d. some code usage examples, i am using FMOD 1.07.07 and Unity 5.3.2f1:

    //unity variable's
[FMODUnity.EventRef]
private string grabSound = "event:/Player/GrabAndRelease";
FMOD.Studio.EventInstance grabSoundEvent = null;
FMOD.Studio.ParameterInstance grabSoundParameter = null;


// at Awake()
grabSoundEvent = FMODUnity.RuntimeManager.CreateInstance(grabSound);
grabSoundEvent.getParameter("grab/Release", out grabSoundParameter);
FMOD.ATTRIBUTES_3D attributes3D = setAtributes();
grabSoundEvent.set3DAttributes(attributes3D);

// playing sound from Update()
grabSoundEvent.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
grabSoundParameter.setValue(0.1f);
FMOD.ATTRIBUTES_3D attributes3D = setAtributes();
grabSoundEvent.set3DAttributes(attributes3D);
grabSoundEvent.start();

//Setting all 3D parameters void
private FMOD.ATTRIBUTES_3D setAtributes()
{
    FMOD.ATTRIBUTES_3D attributes3D = new FMOD.ATTRIBUTES_3D();
    attributes3D.forward.x = this.transform.forward.x;
    attributes3D.forward.y = this.transform.forward.y;
    attributes3D.forward.z = this.transform.forward.z;
    attributes3D.up.x = this.transform.up.x;
    attributes3D.up.y = this.transform.up.y;
    attributes3D.up.z = this.transform.up.z;
    attributes3D.velocity.x = 0f;
    attributes3D.velocity.y = 0f;
    attributes3D.velocity.z = 0f;
    attributes3D.position.x = this.transform.position.x;
    attributes3D.position.y = this.transform.position.y;
    attributes3D.position.z = this.transform.position.z;
    return attributes3D;
}    

As far as i know i have not done anything wrong with using Fmod, setting 3D attributes in a enumeration like this seemed to be the only way, and the rest of the code comes from a few basic tutorials.

I hope anyone has a working solution for me so we can continue using FMOD in our builds. Or if there is no solution to this, when can we expect a fix for these DLL problems?

  • You must to post comments
Best Answer
1
0

Hey Jakub,

People from FMOD gave me this link that should fix my DLL issue.

“If you extract this over your project (backing up first is always a good idea) it should fix the issue.

http://www.fmod.org/files/UnityUnifiedLib.zip

also they claimed they would add a fix to FMOD in the 1.08.01 build. This build should be out already. I did not test this yet.

  • You must to post comments
0
0

I have exactly the same problem. :/ Any solution’s?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.