Static light contained in a blueprint will need lighting rebuilt each time the project is reopened. This only seems to occur for a static light that is parented to a static mesh and then that static mesh is moved away from the BP origin in the viewport.
This is a regression:
Worked in 4.14.3-3249277
Not working in: 4.15.3-3450819
I was debugging the source of a persistent 'Lighting Needs to be Rebuilt' error message and determined it was related to how blueprint actors are initialized after a map load.
The lighting build and save is all fine, the problem is on load. What is happening behind the scenes:
On load, the light component and data is loaded from disk
The light component is assigned the saved location in - Construction script logic immediately kills the light component
Intrinsic construction script generates a replacement point light which also gets a new lightguid
The light is (temporarily) assigned a world location that does not factor in the fact its parent mesh has been had a relative translation applied.
Between the intrinsic and user construction script passes, the lighting component attempts to assign the saved lighting to the component but this fails due to the location check. This prevents the saved lighting guid from being assigned to the light and ultimately the build data for this light is lost. ULightComponent::ApplyComponentInstanceData
After the user construction script pass executes, and the light is repositioned into the correct location.
1. Open the attached test project
Go to Results
Results: When the project is opened, the lighting will need to be rebuilt
Expected: For the lighting that was built before project close to be maintained and build lighting is not needed
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-46652 in the post.