Running the console command "Show Collision" when lights are placed in the scene with "Visibility" off results in the lights turning back on.


Tested in: 4.22.3 CL#7053642 , 4.24.P4 CL#10387632, 4.25 CL#10479005

Steps to Reproduce
  1. Create blueprint project
  2. Add a bright light into the scene
  3. Set the lights 'Visibility' to false (uncheck).
  4. Press Play
  5. Run the "show collision" console command

 Alternative steps

  1. Open any project
  2. Create new level
  3. Add light to level if one not already there
  4. Adjust light intensity and color so it is obvious the light is on or off
  5. Check 'Actor Hidden In Game' on the light's properties
  6. Press Play
  7. Run the "show collision" console command
  8. Actor Hidden Game becomes unchecked during Play and light turns on

Result: The light is turned on

Expected: The light to remain off

FScene::AddLight(ULightComponent * Light) Line 1854
ULightComponent::CreateRenderState_Concurrent() Line 775
FComponentRecreateRenderStateContext::~FComponentRecreateRenderStateContext() Line 36
TIndirectArray<FComponentRecreateRenderStateContext,TSizedDefaultAllocator<32> >::DestructAndFreeItems() Line 425
FGlobalComponentRecreateRenderStateContext::~FGlobalComponentRecreateRenderStateContext() Line 141
UGameViewportClient::ToggleShowCollision() Line 2953
UGameViewportClient::HandleShowCommand(const wchar_t * Cmd, FOutputDevice & Ar, UWorld * InWorld) Line 2833
UGameViewportClient::Exec(UWorld * InWorld, const wchar_t * Cmd, FOutputDevice & Ar) Line 2626
ULocalPlayer::Exec(UWorld * InWorld, const wchar_t * Cmd, FOutputDevice & Ar) Line 1499
UPlayer::ConsoleCommand(const FString & Cmd, bool bWriteToLog) Line 51

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-85245 in the post.

Login to Vote

Affects Versions4.
Target Fix4.26
CreatedDec 2, 2019
UpdatedDec 4, 2019