Search Issue Tracker
By Design
Votes
6
Found in
2018.4
2019.2.19f1
2020.2
Issue ID
1223602
Regression
No
IPostprocessBuildWithReport.OnPostprocessBuild function is not called when the Build fails
How to reproduce:
1. Open the attached project
2. In the Project Window, open the "NewBehaviourScript" located in the Assets folder
3. In the Script, uncomment the 6th line of code
4. Build the project
Expected result: OnPostprocessBuild function is called when the Build fails
Actual result: OnPostprocessBuild function is not called when the Build fails
Reproducible with: 2018.4.19f1, 2019.3.4f1, 2020.1.0b1, 2020.2.0a2
Couldn't test with: 2017.4.37f1 (IPostprocessBuildWithReport does not exist)
-
Atomiz2002
Jan 04, 2024 13:26
Reconsider. The thread above is a pretty strong argument against this decision by your design.
-
Wriggler
Nov 01, 2023 10:19
This is the wrong decision. As users of Unity, we don't want to care about the inner workings of the build system and the concerns of whether it needs to early out or not. We want a simple, consistent API which gets called when the build starts, and when the build finishes (regardless of its success/failure status). We're obviously building more complexity on top of these APIs, and they need to be really reliable as to when they're actually called. The current system has these weird edge cases which just make our job harder than it needs to be. Please consider changing this.
-
roberto_sc
Sep 24, 2021 11:20
If this is by default, then what is BuildReport.summary.result.Failed used for?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Resolution Note:
The build has failed and we stop all processing as quickly as possible to return control of the editor back to the user. This includes further processing of build callbacks that have yet to be called for this build.