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

Build Pipeline

-

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)

  1. 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.

Comments (4)

  1. Atomiz2002

    Jan 04, 2024 13:26

    Reconsider. The thread above is a pretty strong argument against this decision by your design.

  2. 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.

  3. roberto_sc

    Sep 24, 2021 11:20

    If this is by default, then what is BuildReport.summary.result.Failed used for?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.