Search Issue Tracker
Won't Fix
Votes
0
Found in
6000.0.23f1
6000.3.0a6
6000.4.0a1
Issue ID
UUM-114951
Regression
No
[CI/CD]Build cache not invalidated when building targets with different defines
Steps to reproduce:
- Download unity project "[^Build Test.zip]
- Run CLI build in sequence:
{code:java}
<unity.app> -batchmode -quit -projectPath <path> -executeMethod BuildScript.BuildRetail → OK
{code}
{code:java}
<unity.app> -batchmode -quit -projectPath <path> -executeMethod BuildScript.BuildDemo → FAIL{code}
{code:java}
<unity.app> -batchmode -quit -projectPath <path> -executeMethod BuildScript.BuildRetail → FAIL {code}
Actual results: The second Retail build commands fail.
Expected results: The second Retail build should succeed even after a failing build, as a result of switching defines.
Reproducible with versions: 6000.0.23f1, 6000.3.0a5
Tested on (OS): macOS
Notes:
- The build fails due to an error in code compilation from the previous "BuildDemo" failure.
- Adding {{BuildOptions.CleanBuildCache}} to the options does not resolve the issue.
- Using the {{-rebuildLibrary}} CLI argument also does not "fix" the third build. To reset the state, the library folder must be manually deleted.
*
Deleting Library/EditorUserBuildSettings.asset, fixes the issue.
(tracks the build configuration for Player or AssetBundles builds.)
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
tl;dr when switching bps, user need to wait for a domain reload. Otherwise, the build pipeline would stop the building due the the editor errored out from last build. A domain reload would recompile the scripts so when building from failed to success scripts, the scripts would get recompiled to clear the previous error state.
2 workarounds available around this use case.
1. from CLI, use -activeBuildProfile to build.
2. from the editor, surround the profile switching code with EditorApplication.delayCall += () +> {}