Skip to content

Commit 67a11ab

Browse files
Fix for area light emissive mesh not appearing in playmode when Reload Scene is disabled (#1504)
* Create emissive mesh if not created but is requested. * Changelog * Remove unnecessary create function call Co-authored-by: sebastienlagarde <[email protected]>
1 parent a6d819f commit 67a11ab

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
761761
- Fixed CoatMask block appearing when creating lit master node (case 1264632)
762762
- Fixed issue with SceneEV100 debug mode indicator when rescaling the window.
763763
- Fixed issue with PCSS filter being wrong on first frame.
764+
- Fixed issue with emissive mesh for area light not appearing in playmode if Reload Scene option is disabled in Enter Playmode Settings.
764765

765766
### Changed
766767
- Improve MIP selection for decals on Transparents

com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,6 +2312,14 @@ void LateUpdate()
23122312
#endif
23132313

23142314
#if UNITY_EDITOR
2315+
2316+
// If we requested an emissive mesh but for some reason (e.g. Reload scene unchecked in the Enter Playmode options) Awake has not been called,
2317+
// we need to create it manually.
2318+
if (m_DisplayAreaLightEmissiveMesh && (m_ChildEmissiveMeshViewer == null || m_ChildEmissiveMeshViewer.Equals(null)))
2319+
{
2320+
UpdateAreaLightEmissiveMesh();
2321+
}
2322+
23152323
//if not parented anymore, refresh it
23162324
if (m_ChildEmissiveMeshViewer != null && !m_ChildEmissiveMeshViewer.Equals(null))
23172325
{

0 commit comments

Comments
 (0)