Search Issue Tracker
By Design
Votes
0
Found in
2018.2.0b2
2018.2.18f1
Issue ID
1107875
Regression
Yes
[Build Callbacks] OnPreprocessBuild of IPreprocessBuildWithReport is not called when clicking "Build" instead of "Build And Run"
Steps to reproduce:
1. Open attached project
2. Press "Build And Run"
3. Observe that "Error building Player: Exception: hi" is thrown
4. Press "Build"
- Only the following exception is printed:
Exception: hi
MyBuildProcessor.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/MyBuildProcessor.cs:10)
...
Expected result: "Error building Player: Exception: hi" should be thrown after pressing "Build"
Reproduced in: 2019.1.0a13, 2018.2.18f1, 2018.2.0b2
Not reproduced in: 2018.2.0b1, 2018.2.0a9
Regression since: 2018.2.0b2
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
- UI becomes unresponsive when using AppUI Navigation and Event System is attached
- Freeze/crash with multiple StackTraces when opening a specific project
- Crash on TypeContainer<int>::rtti when deleting a Render Texture that is used by the Main Camera
- Multiple ArgumentExceptions are thrown when adding a VisualTreeAsset with Sprite Glyphs to a UIDocument
- Color Node Alpha slider displays incorrect value when viewed in Shader Graph
Resolution Note:
Throwing a generic exceptions in build callbacks do not fail the "Build" but do fail the "Build And Run". This is intended as "Build" does not use the BuildOptions.StrictMode to build while "Build And Run" does. Using BuildFailedException is the correct way to fail a build from a callback. Note: related case 1097286 about BuildFailedException.