Skip to content

fix for freeze in renderpipeline converter #6015

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

Conversation

martint-unity
Copy link
Contributor

@martint-unity martint-unity commented Oct 14, 2021


Purpose of this PR

Fix for this FB Case
https://fogbugz.unity3d.com/f/cases/1353885/
When converting using renderer settings converter it froze if there were more than one setting to convert. This fixes that.


Testing status

Manual tested the bug retro steps from the fogbugz case.

@martint-unity martint-unity requested review from a team as code owners October 14, 2021 08:49
@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://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

URP
/jobDefinition/.yamato%252Fall-urp.yml%2523PR_URP_trunk
With changes to URP packages, you should also run
/jobDefinition/.yamato%252Fall-lightmapper.yml%2523PR_LightMapper_trunk

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
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!

Copy link
Contributor

@RSlysz RSlysz left a comment

Choose a reason for hiding this comment

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

Well, I don't get why this solve your issue. But it seams to help.

@bastienunity can I have your feedback on this change? AFAIK it should speed up having the assetdatabase be in asset editing mode in order to batch change written on disc. It seams in some case it can cause issue.

@bastienunity
Copy link
Contributor

@RSlysz StartAssetEditing and StopAssetEditing should be used to group large asset operations together. Looking at what this method is doing, it modifies assets in memory and then calls for SaveAssets, which already batches all the writing to disk together, so it should be fine to not use it in that case.

@@ -680,7 +679,6 @@ void Convert(ClickEvent evt)
}
m_CoreConvertersList[index].OnPostRun();
AssetDatabase.SaveAssets();
Copy link
Contributor

Choose a reason for hiding this comment

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

Quick question, why is SaveAssets done in the foreach loop and not just one time after every possible conversion is done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we added it here because then we know that things are saved between different converters.

@phi-lira phi-lira changed the base branch from master to universal/staging October 26, 2021 15:07
@phi-lira phi-lira merged commit fb4700a into universal/staging Oct 26, 2021
@phi-lira phi-lira deleted the universal/converter/fix-for-freeze-in-renderpipeline-converter branch October 26, 2021 15:08
phi-lira added a commit that referenced this pull request Nov 9, 2021
* fix for freeze in renderpipeline converter

* updated changelog

* Update CHANGELOG.md

Fixed changelog merge issue

Co-authored-by: Felipe Lira <felipedrl@gmail.com>
@phi-lira phi-lira mentioned this pull request Nov 9, 2021
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.

5 participants