Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.18f1
2022.2.5f1
2023.1.0b2
Issue ID
UUM-25786
Regression
No
IPreprocessBuild.OnPreprocessBuild isn't called when building a project
Reproduction steps:
1. Open project “My project”
2. Open scene “SampleScene”
3. Build and Run project
Expected result: two {{Debug.Log}} messages are thrown in the Console before successful build
Actual result: only one {{Debug.Log}} message is thrown in the Console before successful build
Reproducible with: 2021.3.0f1, 2021.3.18f1, 2022.2.5f1, 2023.1.0b2
Not reproducible with: 2020.3.0f1, 2020.3.44f1
Reproducible on: macOS Catalina 10.15.7 (Intel)
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
User error. If you add a breakpoint on the Debug.Log code inside of IPreprocessBuild.OnPreprocessBuild, it will get hit when you perform a build. The Console just gets cleared when the build triggers a domain reload (code is recompiled). To see Debug.Log code message from IPreprocessBuild.OnPreprocessBuild in the Console, disable the Clear > Clear on Recompile setting. All messages are also added to your project's Editor log.