Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APV] Make sure occluders added for the virtual offset are properly cleaned up #5661

Merged
merged 2 commits into from
Sep 16, 2021

Conversation

FrancescoC-unity
Copy link
Contributor

As the title says.

To do virtual offset we add some occluders for now (will go away once virtual offset is in lightmapper), but along the lines the code that removes those temporary occluders disappeared. This ensure the cleanup happens and it also marks with proper hide flags the newly created components, just in case :D

@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

SRP Core
You could run ABV on your branch before merging your PR, but it will start A LOT of jobs. Please be responsible about it and run it only when you feel the PR is ready:
/.yamato%252F_abv.yml%2523all_project_ci_trunk
Be aware that any modifications to the Core package impacts everyone in the Graphics repo so please discuss the PR with your lead.

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions github-actions bot added the SRP label Sep 15, 2021
@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page).
See the PR template for more information.
Thank you!

@@ -29,6 +29,7 @@ private static void AddOccluders()
if (!mr.gameObject.GetComponent<MeshCollider>())
{
mr.gameObject.AddComponent<MeshCollider>();
mr.GetComponent<MeshCollider>().hideFlags |= (HideFlags.DontSaveInEditor | HideFlags.DontSaveInBuild);
Copy link
Member

Choose a reason for hiding this comment

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

FYI the AddComponent function already returns the added component :)

@JulienIgnace-Unity JulienIgnace-Unity merged commit a6d041d into master Sep 16, 2021
@JulienIgnace-Unity JulienIgnace-Unity deleted the HDRP/cleanup-occluders branch September 16, 2021 13:51
sebastienlagarde pushed a commit that referenced this pull request Sep 20, 2021
…leaned up (#5661)

* Make sure occluders added for the virtual offset are properly cleaned up

* Avoid calling getComponent and add check if object contributes to GI.
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.

4 participants