Files
UnrealEngineUWP/Engine/Source/Runtime/Engine/Private/RectLight.cpp
marc audy 311f7464bf Updated ../Engine/Source/Runtime/... to inline gen.cpp files
Before:
3648 unity files
Total CPU Time: 47886.140625 s
Total time in Parallel executor: 498.81 seconds

After:
3548 unity files
Total CPU Time: 46643.828125 s
Total time in Parallel executor: 486.06 seconds

#jira
#preflight

[CL 22173263 by marc audy in ue5-main branch]
2022-09-24 13:57:58 -04:00

39 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Engine/RectLight.h"
#include "Components/RectLightComponent.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(RectLight)
ARectLight::ARectLight(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer.SetDefaultSubobjectClass<URectLightComponent>(TEXT("LightComponent0")))
{
RectLightComponent = CastChecked<URectLightComponent>(GetLightComponent());
RectLightComponent->Mobility = EComponentMobility::Stationary;
RootComponent = RectLightComponent;
}
void ARectLight::PostLoad()
{
Super::PostLoad();
if (GetLightComponent()->Mobility == EComponentMobility::Static)
{
GetLightComponent()->ClearLightFunctionMaterial();
}
}
#if WITH_EDITOR
void ARectLight::EditorApplyScale(const FVector& DeltaScale, const FVector* PivotLocation, bool bAltDown, bool bShiftDown, bool bCtrlDown)
{
const FVector ModifiedScale = DeltaScale * ( AActor::bUsePercentageBasedScaling ? 10000.0f : 100.0f );
FMath::ApplyScaleToFloat( RectLightComponent->AttenuationRadius, ModifiedScale, 1.0f );
PostEditChange();
}
#endif