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

IL2CPP

-

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

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in: 2021.2.0a7

  2. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in 2021.1.1f1

  3. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.3f1

Comments (2)

  1. 95d275e5e039916108b7c4842657947c?d=mm

    ColeenT

    Apr 21, 2021 23:15

    Issue present in 2020.3.4f1

  2. 73e8a4098040033ff05c329ddd02c865?d=mm

    cla08

    Mar 13, 2021 14:43

    Issue is present in 2020.3.0f1 as well, after upgrading to 2020.1.17

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.