Quick answer: Use FixedString128. Build via += concat. Avoid string.Format in jobs.

Burst inspector errors at string.Format inside an IJob. Managed allocation prohibited.

The Fix

using Unity.Collections;
using Unity.Logging;

[BurstCompile]
struct DebugJob : IJob {
    public int Index;
    public void Execute() {
        FixedString128Bytes msg = default;
        msg.Append("Index: ");
        msg.Append(Index);
        Log.Info(msg);
    }
}

FixedString concat is blittable; Burst-compatible. Unity.Logging Burst-aware writes from worker threads.

Verifying

Burst inspector clean. Job runs; log shows formatted output.

“FixedString. Concat. Blittable.”

Related Issues

For Burst managed call, see managed call. For NativeArray dispose, see dispose.

FixedString. Burst happy.