Description

Visibility of World Outliner doesn't affect skylight. But it affects other kinds of lights like Point Light, Directional Light.

I found that USkyLightComponent::CreateRenderState_Concurrent() doesn't check in bHiddenEdTemporary as below. (ULightComponent::CreateRenderState_Concurrent() used by other light types checks the variable, though.)

void USkyLightComponent::CreateRenderState_Concurrent()
{
 ...
#if WITH_EDITORONLY_DATA
	bHidden = GetOwner() ? GetOwner()->bHiddenEdLevel : false;
#endif // WITH_EDITORONLY_DATA
...

I changed the code to check bHiddenEdTemporary as below. And it seems to fix this issue.

void USkyLightComponent::CreateRenderState_Concurrent()
{
 ...
#if WITH_EDITORONLY_DATA
	bHidden = GetOwner() ? GetOwner()->IsTemporarilyHiddenInEditor()  || GetOwner()->bHiddenEdLevel : false;
#endif // WITH_EDITORONLY_DATA
...
Steps to Reproduce
  1. Create a third person template project
  2. Turn off the skylight's visibility via World Outliner.
  3. You can see that lighting the scene doesn't change at all.
  4. Turn off the directional light's visibility via World Outliner.
  5. You can see that lighting from the directional light disappeared.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-66870 in the post.

1
Login to Vote

Won't Fix
ComponentUE - Graphics Features
Affects Versions4.194.204.21
CreatedNov 27, 2018
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue