-
Notifications
You must be signed in to change notification settings - Fork 817
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
Conversation
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. SRP Core 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. |
It appears that you made a non-draft PR! |
@@ -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); |
There was a problem hiding this comment.
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 :)
…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.
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