Files
UnrealEngineUWP/Engine/Source/Runtime/BlueprintRuntime/Private/BlueprintRuntime.cpp
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#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]
2019-12-26 14:45:42 -05:00

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