So i have this simple job that updates some vertices in a native array but according to the profiler they are not using burst but i don't know why.
This is what my job looks like:
[BurstCompile]
struct DeformJob<T> : IJobParallelFor where T : struct, IMeshDeformPath
{
[ReadOnly]
NativeArray<float3> _input;
[WriteOnly]
NativeArray<float3> _output;
[ReadOnly]
readonly T _path;
[ReadOnly]
readonly int _loop;
public DeformJob(NativeArray<float3> input, NativeArray<float3> output, T path, int loop)
{
_input = input;
_output = output;
_path = path;
_loop = loop;
}
public void Execute(int index)
{
var p = _path.Lerp(index*loop);
var n = _path.Normal(index*loop);
p += math.normalize(n) * _input[index].x;
p.y = _input[index].y;
_output[index] = p;
}
}
How do i get it to use burst?