UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Light.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"
8#include "Light.generated.h"
9
11
12UCLASS(Abstract, ClassGroup=Lights, hideCategories=(Input,Collision,Replication), showCategories=("Input|MouseInput", "Input|TouchInput"), ComponentWrapperClass, ConversionRoot, meta=(ChildCanTick), MinimalAPI)
13class ALight : public AActor
14{
16
19 UPROPERTY(Category = Light, BlueprintReadOnly, meta = (ExposeFunctionCategories = "Light,Rendering,Rendering|Components|Light", AllowPrivateAccess = "true"))
20 TObjectPtr<class ULightComponent> LightComponent;
21public:
22
23 ENGINE_API virtual void GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const override;
24
26 UPROPERTY(replicatedUsing=OnRep_bEnabled)
27 uint32 bEnabled:1;
28
30 UFUNCTION()
31 ENGINE_API virtual void OnRep_bEnabled();
32
34 ENGINE_API void SetMobility(EComponentMobility::Type InMobility);
35
36 // BEGIN DEPRECATED (use component functions now in level script)
37 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
38 ENGINE_API void SetEnabled(bool bSetEnabled);
39 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
40 ENGINE_API bool IsEnabled() const;
41 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
43 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
44 ENGINE_API void SetBrightness(float NewBrightness);
45 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
46 ENGINE_API float GetBrightness() const;
47 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
48 ENGINE_API void SetLightColor(FLinearColor NewLightColor);
49 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
51 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
52 ENGINE_API void SetLightFunctionMaterial(UMaterialInterface* NewLightFunctionMaterial);
53 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
55 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
57 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
59 UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
61 // END DEPRECATED
62
63public:
64 //~ Begin UObject Interface.
66 //~ End UObject Interface.
67
68#if WITH_EDITOR
69 //~ Begin AActor Interface.
70 ENGINE_API virtual void CheckForErrors() override;
71 //~ End AActor Interface.
72#endif
73
77 ENGINE_API bool IsToggleable() const;
78
79 //~ Begin AActor Interface.
80 ENGINE_API virtual void Destroyed() override;
81 virtual bool IsLevelBoundsRelevant() const override { return false; }
82 //~ End AActor Interface.
83
85 class ULightComponent* GetLightComponent() const { return LightComponent; }
86};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
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 Actor.h:257
virtual bool IsLevelBoundsRelevant() const
Definition Actor.h:2558
virtual ENGINE_API void Destroyed()
Definition Actor.cpp:3284
Definition CoreNet.h:300
Definition Array.h:670
Definition MaterialInterface.h:296
Definition EngineTypes.h:3787
Definition Color.h:48
Definition ObjectPtr.h:488