mirror of
https://github.com/storytold/UE4-OSC.git
synced 2026-10-09 00:09:43 +00:00
4.6 port
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
// Target engine version. Used to enable compatibility code.
|
||||
#define OSC_ENGINE_VERSION 40500
|
||||
#define OSC_ENGINE_VERSION 40600
|
||||
|
||||
|
||||
/* Public Dependencies
|
||||
|
||||
@@ -21,9 +21,14 @@ public:
|
||||
HandleSettingsSaved();
|
||||
|
||||
// register settings
|
||||
ISettingsModule* settingsModule = ISettingsModule::Get();
|
||||
#if OSC_ENGINE_VERSION < 40600
|
||||
auto settingsModule = ISettingsModule::Get();
|
||||
#else
|
||||
auto settingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings");
|
||||
#endif
|
||||
if(settingsModule)
|
||||
{
|
||||
#if OSC_ENGINE_VERSION < 40600
|
||||
FSettingsSectionDelegates settingsDelegates;
|
||||
settingsDelegates.ModifiedDelegate = FOnSettingsSectionModified::CreateRaw(this, &FOscModule::HandleSettingsSaved);
|
||||
|
||||
@@ -32,8 +37,19 @@ public:
|
||||
LOCTEXT("OscSettingsName", "OSC"),
|
||||
LOCTEXT("OscSettingsDescription", "Configure the OSC plug-in."),
|
||||
settings,
|
||||
settingsDelegates
|
||||
);
|
||||
settingsDelegates);
|
||||
#else
|
||||
auto settingsSection = settingsModule->RegisterSettings("Project", "Plugins", "OSC",
|
||||
LOCTEXT("OscSettingsName", "OSC"),
|
||||
LOCTEXT("OscSettingsDescription", "Configure the OSC plug-in."),
|
||||
GetMutableDefault<UOscSettings>()
|
||||
);
|
||||
|
||||
if (settingsSection.IsValid())
|
||||
{
|
||||
settingsSection->OnModified().BindRaw(this, &FOscModule::HandleSettingsSaved);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,9 +2,16 @@
|
||||
|
||||
#include "Osc.h"
|
||||
|
||||
#if OSC_ENGINE_VERSION < 40600
|
||||
#include "Core.h"
|
||||
#include "ModuleManager.h"
|
||||
#include "Settings.h"
|
||||
#else
|
||||
#include "Engine.h"
|
||||
#include "ISettingsModule.h"
|
||||
#include "ISettingsSection.h"
|
||||
#endif
|
||||
|
||||
#include "ModuleManager.h"
|
||||
#include "Sockets.h"
|
||||
#include "SocketSubsystem.h"
|
||||
#include "TaskGraphInterfaces.h"
|
||||
|
||||
Reference in New Issue
Block a user