UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LightComponentBase.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "Misc/Guid.h"
9#include "LightComponentBase.generated.h"
10
11class UTexture2D;
12
13UCLASS(abstract, HideCategories=(Trigger,Activation,"Components|Activation",Physics), ShowCategories=(Mobility), MinimalAPI)
14class ULightComponentBase : public USceneComponent
15{
17
18
22 UPROPERTY()
23 FGuid OriginalLightGuid;
24
25 UPROPERTY()
26 FGuid LightGuid;
27
29 UPROPERTY()
31
35 UPROPERTY(BlueprintReadOnly, interp, Category=Light, meta=(DisplayName = "Intensity", UIMin = "0.0", UIMax = "20.0", ShouldShowInViewport = true))
36 float Intensity;
37
42 UPROPERTY(BlueprintReadOnly, interp, Category=Light, meta=(HideAlphaChannel, ShouldShowInViewport = true))
43 FColor LightColor;
44
50 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light, meta = (ShouldShowInViewport = true))
52
56 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light)
57 uint32 CastShadows:1;
58
62 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light, AdvancedDisplay)
64
68 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light, AdvancedDisplay)
70
72 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Light, AdvancedDisplay)
73 uint32 bAffectTranslucentLighting:1;
74
76 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, AdvancedDisplay, meta = (EditCondition="Mobility==EComponentMobility::Movable"))
77 uint32 bTransmission : 1;
78
80 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, AdvancedDisplay)
81 uint32 bCastVolumetricShadow : 1;
82
86 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, AdvancedDisplay)
87 uint32 bCastDeepShadow : 1;
88
90 UPROPERTY()
92
93 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, meta = (DisplayName = "Cast Ray Traced Shadows"), AdvancedDisplay)
94 TEnumAsByte<ECastRayTracedShadow::Type> CastRaytracedShadow;
95
97 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, AdvancedDisplay, meta = (DisplayName = "Affect Ray Tracing Reflections"))
98 uint32 bAffectReflection : 1;
99
101 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, AdvancedDisplay, meta = (DisplayName = "Affect Ray Tracing Global Illumination"))
102 uint32 bAffectGlobalIllumination : 1;
103
107 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Light, AdvancedDisplay, meta = (ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0"))
108 float DeepShadowLayerDistribution;
109
114 UPROPERTY(BlueprintReadOnly, interp, Category=Light, meta=(UIMin = "0.0", UIMax = "6.0"))
115 float IndirectLightingIntensity;
116
118 UPROPERTY(BlueprintReadOnly, interp, Category=Light, meta=(UIMin = "0.25", UIMax = "4.0"))
119 float VolumetricScatteringIntensity;
120
122 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = RayTracing)
123 int SamplesPerPixel;
124
125#if WITH_EDITORONLY_DATA
129
133
137
141#endif
142
144 UFUNCTION(BlueprintCallable, Category="Rendering|Components|Light")
146
148 UFUNCTION(BlueprintCallable, Category="Rendering|Components|Light")
150
151 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light")
153
154 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light")
156
157 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light")
159
160 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light")
162
163 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light", meta = (DeprecatedFunction, DeprecationMessage = "ULightComponentBase::SetCastRaytracedShadow is deprecated. Use ULightComponentBase::SetCastRaytracedShadows instead."))
165
166 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light")
168
169 UFUNCTION(BlueprintCallable, Category = "Rendering|Components|Light")
170 ENGINE_API void SetSamplesPerPixel(int NewValue);
171
173
177 ENGINE_API virtual void PostDuplicate(EDuplicateMode::Type DuplicateMode) override;
178
179#if WITH_EDITOR
181 ENGINE_API virtual void PostEditImport() override;
182 ENGINE_API virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
183
188 {
190 }
191
195 float GetEditorSpriteScale() const
196 {
198 }
199
202#endif
203
208
212 ENGINE_API virtual void UpdateLightGUIDs();
213
215 bool IsMovable() const
216 {
217 return (Mobility == EComponentMobility::Movable);
218 }
219
224 ENGINE_API bool HasStaticLighting() const;
225
231 ENGINE_API bool HasStaticShadowing() const;
232
233#if WITH_EDITOR
235 ENGINE_API virtual void PostLoad() override;
236
238 ENGINE_API virtual void OnRegister() override;
239 ENGINE_API virtual void OnUnregister() override;
240 ENGINE_API virtual bool CanEditChange(const FProperty* InProperty) const override;
241#endif
242
244 ENGINE_API virtual bool ShouldCollideWhenPlacing() const override;
245
247 ENGINE_API virtual FBoxSphereBounds GetPlacementExtent() const override;
248};
249
250
251
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
TCopyQualifiersFromTo_T< From, To > * Cast(From *Src)
Definition Casts.h:95
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition UnrealType.h:3087
Definition UnrealType.h:174
Definition EnumAsByte.h:22
Definition Texture2D.h:26
Definition EngineTypes.h:501
Definition EngineTypes.h:3787
@ Movable
Definition EngineTypes.h:3812
Definition UObjectGlobals.h:126
Definition SceneManagement.h:73
Definition Color.h:486
Definition Guid.h:109
Definition Color.h:48
Definition UnrealType.h:6865
Definition ObjectPtr.h:488
Definition BoxSphereBounds.h:25