Code inspection: Loading managed type is not supported
This inspection reports reads of values whose type is managed inside Burst-compiled code.
This usually happens when Burst code reads a field, variable, or property of a class, interface, array, or another managed type. The same warning can also appear when loading System.Type values for APIs such as SharedStatic.GetOrCreate.
Example
In this example, the data field is of a managed class type. Reading it inside a Burst-compiled job is not supported.
using Unity.Burst;
using Unity.Jobs;
public class ExampleData
{
}
[BurstCompile]
public struct ExampleJob : IJob
{
private static ExampleData data = new ExampleData();
public void Execute()
{
// Reported: loading a managed type is not supported in Burst
var value = data;
}
}
using Unity.Burst;
using Unity.Jobs;
public struct ExampleData
{
public int value;
}
[BurstCompile]
public struct ExampleJob : IJob
{
public ExampleData data;
public void Execute()
{
// Correct: Use unmanaged structs or native containers
var value = data.value;
}
}
Quick-fix
This inspection does not provide a dedicated quick-fix. Fix it manually by replacing the managed value with Burst-compatible data.
26 March 2026