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
- Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- Crash on dynamixel_sdk.dynamixel:groupSyncReadTxRxPacket when entering Play Mode after updating path to Dynamixel SDK in script
- NullReferenceException is thrown when changing the Inspector preview selection
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.