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-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "BlueprintRuntime.h"
|
|
#include "UObject/Class.h"
|
|
#include "BlueprintRuntimeSettings.h"
|
|
#include "Blueprint/BlueprintSupport.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "BlueprintRuntime"
|
|
|
|
class FBlueprintRuntime : public IBlueprintRuntime
|
|
{
|
|
/** IModuleInterface implementation */
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
virtual void PropagateWarningSettings() override;
|
|
virtual UBlueprintRuntimeSettings* GetMutableBlueprintRuntimeSettings() override;
|
|
};
|
|
IMPLEMENT_MODULE(FBlueprintRuntime, BlueprintRuntime)
|
|
|
|
void FBlueprintRuntime::StartupModule()
|
|
{
|
|
}
|
|
|
|
void FBlueprintRuntime::ShutdownModule()
|
|
{
|
|
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
|
|
// we call this function before unloading the module.
|
|
}
|
|
|
|
void FBlueprintRuntime::PropagateWarningSettings()
|
|
{
|
|
const UBlueprintRuntimeSettings* BlueprintRuntimeSettings = GetDefault<UBlueprintRuntimeSettings>();
|
|
// Propagate current settings to the core blueprint runtime, which can not easily
|
|
// leverage the reflection system:
|
|
TArray<FName> WarningsToTreatAsErrors;
|
|
TArray<FName> WarningsToSuppress;
|
|
|
|
for (const FBlueprintWarningSettings& Setting : BlueprintRuntimeSettings->WarningSettings)
|
|
{
|
|
if(Setting.WarningBehavior == EBlueprintWarningBehavior::Error)
|
|
{
|
|
WarningsToTreatAsErrors.Add(Setting.WarningIdentifier);
|
|
}
|
|
else if( Setting.WarningBehavior == EBlueprintWarningBehavior::Suppress)
|
|
{
|
|
WarningsToSuppress.Add(Setting.WarningIdentifier);
|
|
}
|
|
}
|
|
FBlueprintSupport::UpdateWarningBehavior(WarningsToTreatAsErrors, WarningsToSuppress);
|
|
}
|
|
|
|
UBlueprintRuntimeSettings* FBlueprintRuntime::GetMutableBlueprintRuntimeSettings()
|
|
{
|
|
return GetMutableDefault<UBlueprintRuntimeSettings>();
|
|
}
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|