Search Issue Tracker
Won't Fix
Votes
1
Found in
5.4.1p4
Issue ID
840287
Regression
No
Building through batch mode causes compiler to fail for the first time if script is deleted and target platform is changed
Steps to reproduce:
1. Extract attached project "unity-delete-script-master.zip"
2. Open "run_test_case.bat" using text editor and set path to your unity installation
3. Run .bat
4. Open _output folder and there should be four log files
5. Open third one: "unity_editor_step_3.log"
6. Search for "compilation failed" and notice that compiling assembly threw an error:
-----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
Compilation failed: 1 error(s), 0 warnings
-----CompilerOutput:-stderr----------
error CS2001: Source file `Assets/MyFolder/TestScript_toDelete.cs' could not be found
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/Assembly-CSharp.dll
error CS2001: Source file `Assets/MyFolder/TestScript_toDelete.cs' could not be found
Compilation failed: 1 error(s), 0 warnings
Note: build succeeds because after failed compilation code is compiled three more times. Problem is that because of this error build machines might think that build failed.
Reproduced with: 5.3.6p7, 5.4.2f1, 5.5.0b7
Comments (1)
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
artofcode
Apr 09, 2017 21:25
When building using batchmode / BuildPipeline.BuildPlayer and a new class (in a new file!) has been created and referenced in existing files, it also fails.
It succeeds the second time it's run.
Simply running Unity in the same project location once before actually running and building works as a temp. work-around however.