Skip to content

Conversation

alelievr
Copy link
Member

Purpose of this PR

Fix this case: https://fogbugz.unity3d.com/f/cases/1300022/

To fix the domain reload issue, I changed the behavior of the custom pass volume:
Before the fix, disabling a custom pass volume, did not really impact the passes in the volume, they were just not executed.
Now with this fix, the function Cleanup() is called when the Custom Pass Volume component is disabled, which allows releasing the resources allocated in the passes.

Note that it shouldn't change the execution behavior of the passes.


Testing status

Tested that the Setup and Cleanup function of the custom passes are executed correctly when:

  • domain reload happens
  • enter play mode
  • disable gameobject
  • disable custom pass volume component

@alelievr alelievr self-assigned this Dec 17, 2020
@github-actions github-actions bot added the HDRP label Dec 17, 2020
Copy link
Contributor

@pmavridis pmavridis left a comment

Choose a reason for hiding this comment

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

Looks good. I have double-checked that OnDisable is called every time we trigger a destroy, so the change makes sense.

@sebastienlagarde sebastienlagarde marked this pull request as ready for review December 17, 2020 12:38
@sebastienlagarde sebastienlagarde merged commit 2fccfa9 into hd/bugfix Dec 17, 2020
@sebastienlagarde sebastienlagarde deleted the hd/fix/custom-pass-domain-reload branch December 17, 2020 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants