Unreal 4.20 - Too early init of blueprints, IFMODStudioModule::Get(); doesn't help

#1

Hello,
for many versions we have a serious issue that deployment version doesn’t play certain sounds. It’s a well-documented issue because FMOD is being loaded too late.

However this fix doesn’t work:

ATheForestGameMode::ATheForestGameMode()
: Super()
{
IFMODStudioModule::Get();

static ConstructorHelpers::FClassFinder<APawn> PlayerPawnClassFinder(TEXT("/Game/Blueprints/Actor/MainActor"));
DefaultPawnClass = PlayerPawnClassFinder.Class;

// use our custom HUD class
static ConstructorHelpers::FClassFinder<AHUD> HUDClassFinder(TEXT("/Game/Blueprints/UserInterface/BPForestHUD"));
HUDClass = HUDClassFinder.Class;

PlayerControllerClass = AForestPlayerController::StaticClass();

}

I’ve spent days trying to find a workaround but it’s the same. Is there any other way how to ensure, that the phone sound would play correctly?"

Thank you! It’s a real hair-puller for me, as before 4.18 this worked so well.

The relevant log part says:

[2018.10.07-17.20.31:426][ 0]LogStreaming: Error: Couldn’t find file for package /Game/FMOD/Events/Generic/Phone/sms_sound requested by async loading code. NameToLoad: /Game/FMOD/Events/Generic/Phone/sms_sound
[2018.10.07-17.20.31:426][ 0]LogStreaming: Error: Found 1 dependent packages…
[2018.10.07-17.20.31:426][ 0]LogStreaming: Error: /Game/Blueprints/Actor/MainActor
[2018.10.07-17.20.31:426][ 0]LogStreaming: Error: Couldn’t find file for package /Game/FMOD/Events/Generic/Phone/PhoneDialing requested by async loading code. NameToLoad: /Game/FMOD/Events/Generic/Phone/PhoneDialing
[2018.10.07-17.20.31:427][ 0]LogStreaming: Error: Found 1 dependent packages…
[2018.10.07-17.20.31:427][ 0]LogStreaming: Error: /Game/Blueprints/Actor/MainActor
[2018.10.07-17.20.31:427][ 0]LogStreaming: Error: Couldn’t find file for package /Game/FMOD/Events/Generic/Phone/PhoneBeep requested by async loading code. NameToLoad: /Game/FMOD/Events/Generic/Phone/PhoneBeep
[2018.10.07-17.20.31:427][ 0]LogStreaming: Error: Found 1 dependent packages…
[2018.10.07-17.20.31:427][ 0]LogStreaming: Error:
[2018.10.07-17.20.39:564][ 0]LogFMOD: FFMODStudioModule startup
[2018.10.07-17.20.39:564][ 0]LogFMOD: Lib path = ‘…/…/…/TheForest/Plugins/FMODStudio/Binaries’
[2018.10.07-17.20.39:564][ 0]LogFMOD: FFMODStudioModule::LoadDll: Loading …/…/…/TheForest/Plugins/FMODStudio/Binaries/Win64/fmodL64.dll
[2018.10.07-17.20.39:604][ 0]LogFMOD: FFMODStudioModule::LoadDll: Loading …/…/…/TheForest/Plugins/FMODStudio/Binaries/Win64/fmodstudioL64.dll
[2018.10.07-17.20.39:790][ 0]LogFMOD: Loading strings bank: …/…/…/TheForest/Content/FMOD/Desktop/Master Bank.strings.bank
[2018.10.07-17.20.39:804][ 0]LogFMOD: Constructing asset: /Game/FMOD/Buses/Music

0 Likes

#2

We are currently investigating this issue.

It seems that using the Event Driven Loader can cause things that use FMOD to get loaded before the integration does. This means that the uassets created from the banks won’t have been loaded in time for them to be referenced.

1 Like

#3

Hi,

indeed - disabling Event Driven Loader in UE4 fixed this issue.

Thanks,
Jan

0 Likes

#4

Great to hear you managed to get around this, we will still investigate whether there is another way around this.

0 Likes

#5

I have upgraded to Unreal Engine 4.22 and unfortunately was getting a crash with EventDrivenLoader disabled. Have found a fix though that allows FMOD to work with it enabled - if you change the LoadingPhase in FMODStudio.uplugin from ‘PreDefault’ to ‘PreEarlyLoadingScreen’ it gets loaded before the blueprints and works fine. This also requires you remove IFMODStudioModule::Get(); from any constructors as they may load outside of the game thread.

Edit: On further inspection this causes the editor to not load. I have made these changes to the modules so that it works in both the editor and packaged builds.

  "Modules": [
    {
      "Name": "FMODStudio",
      "Type": "CookedOnly",
      "LoadingPhase": "PreEarlyLoadingScreen"
    },
    {
        "Name": "FMODStudio",
        "Type": "Editor",
        "LoadingPhase": "PreDefault"
    },
    {
      "Name": "FMODStudioEditor",
      "Type": "Editor"
    }
  ],
0 Likes