Quick answer: No managed types, classes, or string operations inside Burst job. Use NativeArray, structs, FixedString.
Job uses Debug.Log for diagnostics. Burst inspector errors. Managed call prohibited.
The Fix
using Unity.Collections;
using Unity.Logging;
[BurstCompile]
struct SimJob : IJob {
public NativeArray<float3> Data;
public void Execute() {
for (int i = 0; i < Data.Length; i++) {
// Debug.Log: managed, prohibited
Log.Info("processed {0}", i); // Burst-compat package
Data[i].x += 1f;
}
}
}
Unity.Logging package supplies Burst-compatible Log.Info etc. Or remove logging entirely from hot jobs; log on main thread after Complete.
Verifying
Burst inspector clean. Job compiles. Without removal: Burst falls back to managed slow path or fails.
“Blittable only. Logging via package.”
Related Issues
For Burst FunctionPointer, see function pointer. For Burst SharedStatic, see SharedStatic.
Blittable. Job runs.