Unity Burst compiler failed during CI build
Burst compiles [BurstCompile] jobs to native code at build time. In CI it fails when the editor image lacks the native toolchain Burst needs, or when a job uses constructs Burst cannot compile.
What this error means
The build log shows "Burst compiler ... failed" or "Burst error" entries, and the player build aborts during the Burst AOT step.
Burst error BC1016: The managed function ... is not supported
Burst compiler (1.8): compilation failed for ...
Build completed with a result of 'Failed'Common causes
Missing native toolchain in the editor image
Burst AOT shells out to a platform compiler. A slim editor image without the toolchain for the target cannot complete the native compile.
Unsupported code in a Burst job
Managed types, exceptions, or reflection inside a [BurstCompile] method are not supported and make Burst fail (for example BC1016).
How to fix it
Use an editor image with the platform toolchain
Build with a GameCI image variant that includes the native toolchain (and NDK for Android) so Burst AOT can compile.
- uses: game-ci/unity-builder@v4
with:
targetPlatform: StandaloneLinux64
customImage: unityci/editor:ubuntu-2022.3.21f1-linux-il2cpp-3Fix the unsupported code or disable Burst for it
- Read the
BCerror and the method it names. - Remove managed allocations, exceptions, or reflection from the job.
- If needed, remove
[BurstCompile]from that method to unblock the build.
How to prevent it
- Build with images that include the Burst target toolchain.
- Keep
[BurstCompile]methods to blittable, allocation-free code. - Run a Burst build locally before pushing to catch BC errors.