You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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]
39 lines
1.1 KiB
C++
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
|
|
|
|
|