Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2020.3.X, 2021.1.X
Votes
0
Found in
2020.2.0a17
2020.2.2f1
2021.1
2021.2
Issue ID
1313412
Regression
Yes
[Windows] Build fails due to read-only files detected as native plugins by Unity
How to reproduce:
1. Open the user's attached project
2. Make the myfile.h file in the project read-only (in the user's case, Perforce will do this, but we can emulate it here).
3. In the Build settings, set Windows Standalone as Target Platform and build the project (build should succeed)
4. Confirm that you see a copy of the "myhfile.h" file in the IL2CPP output folder (\build_error_repro\Library\Il2cppBuildCache\Windows\x64\il2cppOutput) and that this file is read-only
5. In Unity Editor, add a new script to the project
6. Build the project again
Expected results: Build succeeds
Actual results: Build fails, an error can be seen in the console: "Failed running C:\Program Files\2020.2\2020.2.3f1_270dd8c3da1c\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe --useprebuiltbuildprogram --no-colors"
Reproducible with: 2020.2.0a17, 2020.2.3f1, 2021.1.0b5, 2021.2.0a4
Not reproducible with: 2018.4.31f1, 2019.4.20f1, 2020.2.0a16 ("myhfile.h" file is not present in the Library folder, so the build succeeds)
Notes:
1. Deleting the Library folder allows the build to succeed again
2. With Unity 2020.2.0a17 the same error appears after a first build
3. This issue is related to Unity detecting any .h file in the Assets folder as a Native Plugin. See https://docs.unity3d.com/Manual/PluginInspector.html
-
ahmedaniss
May 23, 2021 18:23
Problem fixed here : https://forum.unity.com/threads/il2cpp-build-fail.982098/page-2#post-7168408
-
ColeenT
Apr 21, 2021 23:15
Issue present in 2020.3.4f1
-
cla08
Mar 13, 2021 14:43
Issue is present in 2020.3.0f1 as well, after upgrading to 2020.1.17
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.0a7
Resolution Note (fix version 2021.1):
Fixed in 2021.1.1f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.3f1