Skip to content

Conversation

@FrancescoC-unity
Copy link
Contributor

Fix for https://fogbugz.unity3d.com/f/cases/1265021

Issue was that mesh is generally created in the Awake() function, which however is never called if the 'Reload Scene' option in the Enter Playmode Settings.

This change essentially make sure that by the time LateUpdate is called, the mesh is created if it has not been yet.

What have I tested: I tested the repro case, I also tried to change properties before (in edit mode) and after (in playmode) and see they applied. I tried with the Reload Scene on or off.

@FrancescoC-unity FrancescoC-unity requested review from a team and sebastienlagarde August 4, 2020 13:12
@FrancescoC-unity FrancescoC-unity self-assigned this Aug 4, 2020
Copy link
Contributor

@TomasKiniulis TomasKiniulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked repro project with multiple emissive mesh area lights on custom layers with Reload Scene enabled/disabled. Works as expected now!

@sebastienlagarde sebastienlagarde merged commit 67a11ab into HDRP/staging Aug 5, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/fix-emissive-mesh-not-displaying-when-reload-scene-is-off branch August 5, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants