Answered
1
0

Hi,

Do you plan to provide an updated version of the plugin for UE4 4.6?

  • You must to post comments
Best Answer
1
0

Hi,

I wanted to share some progress with people running UE4.6 and being blocked with projects using FMOD plugin for UE4.5.1

If you are using UE4 that you build yourself though source code then here is how I’ve updated the only required FMOD source file, in order to run the current plugin version (UE4.5.1) within UE4.6.0

Go to:
UnrealEngine\Engine\Plugins\FMODStudio\Source\FMODStudioEditor\Private\FMODStudioEditorModule.cpp

Remove the include of Settings.h

Add the following includes

#include "ISettingsModule.h"
#include "ISettingsSection.h"

The way to get a reference to the module has been changed, the ISettingsModule::Get() method has been replaced by a method used by FModuleManager. Also, the delegate mecanism is now using a shortcut for registering settings. Here is the updated method startupModule:

void FFMODStudioEditorModule::StartupModule()
{
    UE_LOG(LogFMOD, Verbose, TEXT("FFMODStudioEditorModule startup\n"));

    AssetBroker = MakeShareable(new FFMODAssetBroker);
    FComponentAssetBrokerage::RegisterBroker(AssetBroker, UFMODAudioComponent::StaticClass(), true, true);

    if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
    {
        ISettingsSectionPtr SettingsSection = SettingsModule->RegisterSettings("Project", "Plugins", "FMODStudio",
            LOCTEXT("FMODStudioSettingsName", "FMOD Studio"),
            LOCTEXT("FMODStudioDescription", "Configure the FMOD Studio plugin"),
            GetMutableDefault<UFMODSettings>()
        );

        if (SettingsSection.IsValid())
        {
            SettingsSection->OnModified().BindRaw(this, &FFMODStudioEditorModule::HandleSettingsSaved);
        }
    }

    MainMenuExtender = MakeShareable(new FExtender);
    MainMenuExtender->AddMenuExtension("HelpBrowse", EExtensionHook::After, NULL, FMenuExtensionDelegate::CreateRaw(this, &FFMODStudioEditorModule::AddHelpMenuExtension));
    FLevelEditorModule* LevelEditorModule = FModuleManager::GetModulePtr<FLevelEditorModule>( "LevelEditor" );
    if (LevelEditorModule)
    {
        LevelEditorModule->GetMenuExtensibilityManager()->AddExtender(MainMenuExtender);
    }

    // Register slate style overrides
    FFMODStudioStyle::Initialize();

    FEditorDelegates::BeginPIE.AddRaw(this, &FFMODStudioEditorModule::BeginPIE);
    FEditorDelegates::EndPIE.AddRaw(this, &FFMODStudioEditorModule::EndPIE);
    FEditorDelegates::PausePIE.AddRaw(this, &FFMODStudioEditorModule::PausePIE);
    FEditorDelegates::ResumePIE.AddRaw(this, &FFMODStudioEditorModule::ResumePIE);

    ViewportDrawingDelegate = FDebugDrawDelegate::CreateRaw(this, &FFMODStudioEditorModule::ViewportDraw);
    UDebugDrawService::Register(TEXT("Editor"), ViewportDrawingDelegate);

    OnTick = FTickerDelegate::CreateRaw( this, &FFMODStudioEditorModule::Tick );
    FTicker::GetCoreTicker().AddTicker( OnTick );
}

Also, at the end of the file, line 264, for unregistering the module:

if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
    {
        SettingsModule->UnregisterSettings("Project", "Plugins", "FMODStudio");
    }

Note that the include of Slate.h is now deprecated. I’ve just removed it from the file to avoid the warning and the solution still compiles and run without any issue. Slate seems to be integrated seemlessly now.

After that I was able to run again my Project which is usiing FMOD Audio components created with the current FMOD Studio 1.05.08 without issues.

Obviously, regarding the little fix needed to make the current plugin working with UE4.6, I can imagine that the upcoming FMOD Plugin that will be released officially for UE4.6 is introducing more than just this fix. Also, maybe FMOD team is waiting for the upcoming UE4 hot fix 4.6.1.

Anyway, I wanted to thank you for this software, FMOD Studio and UE4 Plugin is a wonderful and amazing time-saving audio suite!

  • Colby Hill
    Thanks for figuring this out and sharing it. I was just about to compile from source and work from there when I found this. The rest of the team left behind our sound programmer for the new features in 4.6 so now we can get back on track with development.
  • You must to post comments
0
0

It will be coming shortly.

  • Mehmet Güven
    Hello! Are you going to get the plugin updated to 4.6 now that the 4.6.1 hotfix is out? I would like to know if you arent going to release a compiled plugin anymore so that i can move on. Thanks.
  • You must to post comments
0
0

Thank you!

I was wondering if it was just possible to build it from source by updating the cs build file and adding the required module there, while removing the include seeing that the dependencies mechanism has been updated in 4.6.

Do you know how to replace the Settings.h? In other words, which module can we add in the cs build file in order to match the ISettingsModule interface?

  • Tensa_Zangetsu
    Nevermind, the module name is Settings but sounds like the ModuleInterface has been changed. The method Get doesnt' seems to be there anymore. I can only wait for the new version ;)
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.