Description

If static mesh's material slot's cast shadow is changed, UE4 does not show "LIGHTING NEEDS TO BE REBUILT".

I solved it with the following fixes.

StaticMeshEditorTools.cpp

void FMeshSectionSettingsLayout::OnSectionCastShadowChanged
{
...
-  CallPostEditChange();
+ CallPostEditChange(Property);
}

StaticMesh.cpp

void UStaticMesh::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
...
	// Only unbuild lighting for properties which affect static lighting
	if (PropertyName == GET_MEMBER_NAME_CHECKED(UStaticMesh, LightMapResolution)
	|| PropertyName == GET_MEMBER_NAME_CHECKED(UStaticMesh, LightMapCoordinateIndex)
+      || PropertyName == GET_MEMBER_NAME_CHECKED(UStaticMesh, SectionInfoMap))
	{

...

}

Perhaps [Link Removed] may also be fixed.
https://jira.it.epicgames.net/browse/UE-21591

Steps to Reproduce
  1. Add StaticMesh and StaticLight to empty level
  2. Change static mesh's material slot's cast shadow
  3. UE4 does not show "LIGHTING NEEDS TO BE REBUILT"

Have Comments or More Details?

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

1
Login to Vote

Won't Fix
ComponentUE - Graphics Features
Affects Versions4.18.1
CreatedDec 7, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue