Bolt.Addons.Community
Bolt.Addons.Community copied to clipboard
Build temporary files in case stay after Build Cancel, need cleanup
When cancelling a Build, the Temporary-Build folder and its link.xml and meta files remain. This is because BuildHelper.cs PackagesLinkXmlExtractor.OnPostprocessBuild is not called.
I found a way to plug build cancel events on https://answers.unity.com/questions/1724656/how-to-get-a-callback-when-build-was-canceled.html
Could you try to implement this? It looks like checking the build result is not that easy, so instead of clearing files in some extra event only if build was cancelled, maybe just move the content of OnPostprocessBuild to the custom cleanup method called in the finally block, as to centralize cleanup.