You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "MagicLeapSDKSettings.h"
|
|
#include "Interfaces/ITargetPlatformManagerModule.h"
|
|
#include "Interfaces/IAndroidDeviceDetection.h"
|
|
#include "Misc/Paths.h"
|
|
|
|
DEFINE_LOG_CATEGORY_STATIC(MagicLeapSDKSettings, Log, All);
|
|
|
|
UMagicLeapSDKSettings::UMagicLeapSDKSettings()
|
|
: TargetManagerModule(nullptr)
|
|
, LuminDeviceDetection(nullptr)
|
|
{
|
|
}
|
|
|
|
#if WITH_EDITOR
|
|
void UMagicLeapSDKSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
|
|
{
|
|
Super::PostEditChangeProperty(PropertyChangedEvent);
|
|
UpdateTargetModulePaths();
|
|
}
|
|
|
|
void UMagicLeapSDKSettings::SetTargetModule(ITargetPlatformManagerModule* InTargetManagerModule)
|
|
{
|
|
TargetManagerModule = InTargetManagerModule;
|
|
}
|
|
|
|
void UMagicLeapSDKSettings::SetDeviceDetection(IAndroidDeviceDetection* InLuminDeviceDetection)
|
|
{
|
|
LuminDeviceDetection = InLuminDeviceDetection;
|
|
}
|
|
|
|
void UMagicLeapSDKSettings::UpdateTargetModulePaths()
|
|
{
|
|
TArray<FString> Keys;
|
|
TArray<FString> Values;
|
|
|
|
if (!MLSDKPath.Path.IsEmpty())
|
|
{
|
|
FPaths::NormalizeFilename(MLSDKPath.Path);
|
|
Keys.Add(TEXT("MLSDK"));
|
|
Values.Add(MLSDKPath.Path);
|
|
}
|
|
|
|
SaveConfig();
|
|
|
|
if (Keys.Num() != 0)
|
|
{
|
|
if (TargetManagerModule != nullptr)
|
|
{
|
|
TargetManagerModule->UpdatePlatformEnvironment(TEXT("Lumin"), Keys, Values);
|
|
}
|
|
|
|
if (LuminDeviceDetection != nullptr)
|
|
{
|
|
LuminDeviceDetection->UpdateADBPath();
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|