Missing property on spotlight component

I notice that the spotlight component, different from the spotlight actor, doesn’t have the property max draw distance to be set. I believe it is quite an important one regarding the performance of lights, and probably an easy fix, I imagine.

Regards

Steps to Reproduce
Just create a blueprint actor and try to use the Add Spot Light component, you will see that the max draw distance is missing.

Hello [mention removed]​,

Thanks for bringing this up.

I’ve tested this in both UE 5.5 and the 5.6 Preview, and I can see the Max Draw Distance property when the SpotLight Component is selected inside a Blueprint Actor (in defaults and placed on the level).

Just to confirm, after adding the SpotLight component, are you selecting it in the Components panel? The property won’t show up if you’re looking at the actor itself or a different component.

Best,

Francisco

Hello [mention removed]​,

Thanks for the clarification. I can reproduce the issue locally.

Doing a bit of research into this issue, I found the MaxDrawDistance property is defined in ULightComponent as:

// In LightComponent.h UPROPERTY(EditAnywhere, Category = Performance) float MaxDrawDistance;However, it lacks the BlueprintReadWrite specifier and is declared in a private section by default. This means it’s not visible or editable at runtime in Blueprints. It’s also not accessible from derived classes in C++. This behavior remains unchanged since the first UE5 version.

Modifying the engine to add the BlueprintReadWrite specifier in the property would allow you to change its value after calling Add Spot Light Component. If you prefer not to modify the engine, then unfortunately you would need to avoid creating the spotlight component at runtime if you need to set this property.

Please let me know if this information helps.

Best,

Francisco

In this case, during the construction script, I called the add spot light component, but it was not added by the Add button.[Image Removed]

What is missing is when I get the return value, I cannot find the max draw distance there

I can make a blueprint with the scenario if you cannot reproduce the issue.

Hi, given that is such an important property to be exposed, wonder if this wouldn’t be actually a good thing to be pushed to the actual engine?

Hello [mention removed]​,

I’m going to consult the engine internal team whether this could be considered for an engine change.

I would also like to suggest another workaround. Create a subclass of SpotlightComponent, set the default MaxDrawDistance value then use this class when adding the actor component via Add Component By Class.

Best,

Francisco