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