ETA for FMOD for UE 4.16 ?

@Daniel Zaidan

I am guessing just sit tight and wait for the official release

@Alex
Yeah, but I canā€™t afford to do that right now.
I must start certification in order to hit the August release date for my game.
If I miss that, itā€™ll start the ā€œno-indie-allowedā€ time of year and weā€™ll have to delay the game to next year. And God-only-knows what complications would arise if we do that.
I canā€™t start certification in 4.15 because Epic implemented a version of the Xbox SDK in UE4.15 that already expired. Given that the game is in great shape already, all I have to do is to have it running on all platforms to start certā€¦

Update on the bug:
Apparently, no struct that I create in the FMOD plugin will cook properly (I created a few test structs).
However, I created a test plugin and managed to get a struct cooking correctly.
Right now, Iā€™m assuming it has to do with the ā€œIncompatible pluginā€ message I get when opening the editor (this message also appears when I launched a build I made that had the FMODStudio plugin enabled but didnā€™t use it at all.)
I couldnā€™t find anything related to this message, so Iā€™m assuming itā€™s in 4.16 territory.
I didnā€™t find any explicit version number of the plugin in the FMODStudio code, so Iā€™m not sure how to ā€œbuild it for 4.16 properlyā€.

Full Message:
Incompatible Plugin
ā€˜FMOD Studio Integrationā€™ plugin was designed for a different version of the engine. Attempt to load it anyway?

Iā€™ll update it here should I find anything.

After building FMOD by loading project and letting UE4 rebuild plugin, I canā€™t build project with this FMOD for Android (Gear VR). I am getting:

UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: ERROR: Couldnā€™t find module rules file for module ā€˜FMODStudioOculusā€™.

I tried building FMOD from MSVC, for Android (Shipping), and got the following errors:

https://pastebin.com/0rXwD3ZJ

Ok, so I finally got this work.
The (final) problem was that Unreal was complaining the plugin was set to a different version and for some reason, generated the Unkonwn struct error in the cooking process.

To solve it, I simply edited the FMODStudio.uplugin file (with Notepad) and deleted the line that specified the engine version.

To recap the whole process to get it working:

  • Download the Github files and Copy the FMODStudio folder to you Plugins folder in the project directory.
  • Download the latest version of the FMOD Integration from the Downloads page and copy the Binaries folder to the FMODStudio folder inside the Plugins folder.
  • Right click the FMODStudio.uplugin file inside FMODStudio, open with Notepad, and delete this line: ā€œEngineVersionā€ : ā€œ4.6.0ā€,

Thatā€™s it!
Iā€™m not sure if this will make the plugin not-backwards compatible to different engine versions but it seemed to work fine for 4.16! :smiley:

I was able to build FMOD this way without deleting engine version. The problem is that I canā€™t even build project with this FMOD. I am getting:

UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: ERROR: Couldnā€™t find module rules file for module ā€˜FMODStudioOculusā€™.

I tried building it from MSVC too, for Android (Shipping), and got the following errors:

https://pastebin.com/0rXwD3ZJ

Never mind, I fixed it. FMOD got built for Android and I was able to build my project for Gear VR. Sound appears to be working on the device, but I had no time to confirm whether spatialization (Oculus plugins) works or not.

This is the fix: https://github.com/fmod/ue4integration/issues/11

Just saw commit 57 and that one builds right out of the box. Also, ā€œEngineVersionā€ : ā€œ4.16.0ā€, in .uplugin file works well. Not sure why you had to remove ā€œEngineVersionā€ to begin with.

I just removed because that was the first thing that came to mind. I donā€™t really know the effects of specifying thatā€¦ :stuck_out_tongue:

Hi! Thanks for the guide, works great!

I had an issue with adding FMOD as a plugin in the game directory though, as this breaks Hot Reload from VS. Seems to be a bug with plugins in general, as soon as youā€™re referencing one in the code and doing a reload, it will fail and the compile button in the editor is gone. (https://answers.unrealengine.com/questions/571743/hot-reload-not-working-sometimes.html)

Solution was to add the FMOD plugin to my engine source instead, just like the documentation explains. Somehow one of the classes had a couple of compile errors, because no category was set in the UPROPERTY macro (I just set it to ā€œDefaultā€). Not sure why these errors didnā€™t come up when compiling it with my game code. And sound was written as ā€œsountā€ in one of the comments, that hurt my eyes lol.

So far this seems to work, as the editor does not try to hot reload plugins added to the engine.

@Daniel Zaidan

Hey, regarding these steps you have provided:

ā€œDownload the Github files and Copy the FMODStudio folder to you Plugins folder in the project directory.
Download the latest version of the FMOD Integration from the Downloads page and copy the Binaries folder to the FMODStudio folder inside the Plugins folder.
Right click the FMODStudio.uplugin file inside FMODStudio, open with Notepad, and delete this line: ā€œEngineVersionā€ : ā€œ4.6.0ā€,ā€

Do these steps refer to launching Unreal and letting it rebuild the engine, or do they refer to building the plugin using the ā€˜runuatā€™ command which is discussed here?

https://www.fmod.org/questions/question/how-to-build-fmodstudiooculus-plugin-ue4-windows/

I have never built FMOD source code before so would benefit from a completely n00b set of steps for the whole thing. :slight_smile: When I attempt to launch Unreal after following your steps above, it displays a message about the plugins being made with a different version, is this correct?

Thanks in advance!

@Jacob Almond
I just opened the editor and let it rebuild the dlls.
Iā€™m not familiar with rebuilding the plugin using this command (Iā€™m also a noob hehehe)

I was getting the message about the engine version before I deleted the EngineVersion : 4.6.0 line inside the .uplugin. So when I deleted that, I stopped getting the message.

However, two considerations:
The Github page was updated after I got it, so my solution is possibly outdated (yeah, alreadyā€¦). Alex, for instance, said above that commit 57 made the plugin compile right off the bat, no need to modify the .uplugin.
I also have the Unreal engine built from source which allows me to build the dlls normally (as well as any automated build that the Unreal Build Tool might want to do), so Iā€™m not sure how that would work with the binary version.

Sorry I couldnā€™t be any more useful.

Cheers.

Hi, Iā€™m able to build FMOD Studio with 4.16 just fine, using the latest (yesterday) GitHub. I do not use Occulus nor do I need Android. Everything works fine when running from the editor (even launching there).

However, when I try to run my packaged game, it crashes with the following error message (packaged in Development build mode so that I can get the log results and start the debugger):

[2017.06.02-14.47.55:370][  0]LogWindows:Error: === Critical error: ===
[2017.06.02-14.47.55:370][  0]LogWindows:Error: 
[2017.06.02-14.47.55:370][  0]LogWindows:Error: Fatal error: [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 606] 
[2017.06.02-14.47.55:370][  0]LogWindows:Error: Compiled in export /Game/FMOD/Buses/Master/Master not found; it was never registered.
[2017.06.02-14.47.55:370][  0]LogWindows:Error: 
[2017.06.02-14.47.55:370][  0]LogWindows:Error: 

I do use a bus in the mixer window, called master, which I assigned all my FMOD events to for global volume control in the game settings. Any help there? My game uses a single compressed .pak file, whereas the package settings are like this:

Directories to never cook: FMOD
Additional Non-Asset Direcotries To Copy: FMOD

My directory is located in {Games Content Folder}\FMOD\Desktop
The master bank file is copied to the package directory and seems to be loaded just fine, according to the logs:

[2017.06.02-14.47.54:220][  0]LogFMOD: FFMODStudioModule startup
[2017.06.02-14.47.54:220][  0]LogFMOD:  Lib path = '../../../GameName/Plugins/FMODStudio/Binaries'
[2017.06.02-14.47.54:220][  0]LogFMOD: FFMODStudioModule::LoadDll: Loading ../../../GameName/Plugins/FMODStudio/Binaries/Win64/fmodL64.dll
[2017.06.02-14.47.54:333][  0]LogFMOD: FFMODStudioModule::LoadDll: Loading ../../../GameName/Plugins/FMODStudio/Binaries/Win64/fmodstudioL64.dll
[2017.06.02-14.47.54:663][  0]LogFMOD: Loading strings bank: ../../../GameName/Content/FMOD/Desktop/Master Bank.strings.bank
[2017.06.02-14.47.54:721][  0]LogFMOD: Constructing asset: /Game/FMOD/Events/Environment/Metallic_Door_Closing
...
[2017.06.02-14.47.54:722][  0]LogFMOD: Constructing asset: /Game/FMOD/Buses/Master
...

The FMOD project has been successfully converted to FMOD Studio 1.09.04 before. I also made sure to delete everything in the games FMOD folder and let it be recreated after reimporting banks just to make sure that there is no garbage left/cached. Same goes for Saved/Cooked, Saved/StagedBuilds and Package folders.

What is left to do is to try two things: Donā€™t use the master bus and see if it runs fine then and create a blank new ue4 and fmod project and see if this error persists. I will add a comment with the results of these steps here, but if that fails as well, Iā€™m running out of ideas.

1 Like

One more thing: I tried the following engine builds: Launcher 4.16.0, Launcher 4.16.1, Custom Source Build 4.16.0 and Custom Source Build 4.16.1

All the same

So far, it still crashes when I donā€™t use the bus. However, it now crashed when it tries to access FMOD events (that exists and are constructed according to the log files.

[2017.06.03-08.46.27:611][  0]LogWindows:Error: === Critical error: ===
[2017.06.03-08.46.27:611][  0]LogWindows:Error: 
[2017.06.03-08.46.27:611][  0]LogWindows:Error: Fatal error: [File:F:\UnrealSource\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 606] 
[2017.06.03-08.46.27:611][  0]LogWindows:Error: Compiled in export /Game/FMOD/Events/WoodenDoor_Spy/WoodenDoor_Spy not found; it was never registered.
[2017.06.03-08.46.27:611][  0]LogWindows:Error: 

Now I will try a blank project with a new fmod project. If that still crashes, it has to be an FMOD or Unreal issue (but my guess is that FMOD isnā€™t doing something that is required by UE4 since 4.16, sounds like this new Asset Manager stuff, which was implemented as ā€˜early accessā€™ in 4.16).

Okay, a blank new project with a new fmod project works just fine in packaged build. Guess it has something to do with my game then. I just need to find out what is causing the issues now.

I (think) I found the issue. The problem is, that in my Game Mode, I do this in the constructor:

(void)IFMODStudioModule::Get();

I do this to ensure that the FMODStudioModule is loaded before my character blueprint gets loaded, as it references some FMOD assets (for example, sound playback on jump).

If I donā€™t add this line (or comment it out), everything runs again, but the FMOD sounds for jumping wonā€™t be played in packaged build again (as these arenā€™t yet loaded).

How to handle this? I think I will also add a github issue now that I have pinned the issue down.

This can be solved by following the steps mentioned on the Deployment page of the UE4 documentation:

"Loading blueprints before plugin load

One issue to be aware of is where blueprints are serialized from disk too early, before any plugins are loaded. This can occur from the following code, which is included by default in example C++ projects constructor:

static ConstructorHelpers::FClassFinder PlayerPawnClassFinder(TEXT("/Game/FirstPersonCPP/Blueprints/FirstPersonCharacter"));
The finder will serialize the first person character blueprint, but any FMOD references will fail to load since the FMOD plugin has not been created yet. To make sure that the FMOD plugin is loaded first, add the line of code above the class finder.

IFMODStudioModule::Get();"

Hi Cameron, thank you for the answer.

The problem is, that this is exactly what I was doing already: IFMODStudioModule::Get();

I did so ion my GameModeā€™s constructor. The problem is, that the constructor is called as soon as the pak file is loaded by UE4 to gather some defaults from the classes or something like this. I donā€™t know why, but that exact call of IFMODStudioModule::Get(); caused the crash.

When I removed it, it did no longer crash (but then the FMOD events wouldnā€™t play).

I worked around this issue by overriding my GameModes ā€œInitGameā€ method, and do the call to IFMODStudioModule::Get(); just there (also, there I set my DefaultPawnClass instead of in the constructor).

It feels kind of hacky, but no longer crashes on startup and all FMOD events play as they should in packaged build.