UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DirectionalLight.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 "Engine/Light.h"
8#include "DirectionalLight.generated.h"
9
10class UArrowComponent;
12
16UCLASS(ClassGroup=(Lights, DirectionalLights), MinimalAPI, meta=(ChildCanTick))
18 : public ALight
19{
21
22#if WITH_EDITORONLY_DATA
23 // Reference to editor visualization arrow
24private:
25 UPROPERTY()
27
28 /* EditorOnly reference to the light component to allow it to be displayed in the details panel correctly */
29 UPROPERTY(VisibleAnywhere, Category="Light")
31#endif
32
33public:
34
35 // UObject Interface
36 virtual void PostLoad() override;
37#if WITH_EDITOR
38 virtual void LoadedFromAnotherClass(const FName& OldClassName) override;
39 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
40 virtual bool CanChangeIsSpatiallyLoadedFlag() const override { return false; }
41 virtual void GetStreamingBounds(FBox& OutRuntimeBounds, FBox& OutEditorBounds) const override { OutRuntimeBounds.Init(); OutEditorBounds.Init(); }
42#endif
43
44public:
45
46#if WITH_EDITORONLY_DATA
49
51 UDirectionalLightComponent* GetComponent() const { return DirectionalLightComponent; }
52#endif
53};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition NameTypes.h:617
Definition UnrealType.h:6865
Definition ObjectPtr.h:488