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
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-53142 in the post.
| 1 |
| Component | UE - Graphics Features |
|---|---|
| Affects Versions | 4.18.1 |
| Created | Dec 7, 2017 |
|---|---|
| Resolved | Aug 18, 2021 |
| Updated | Aug 18, 2021 |