From my understanding as long as you manually define the types when you create the Job it should work with Burst.
Here is the Job I am attempting to use, and it is marked as BurstCompiled:
[BurstCompile]
public struct ECTParallelJob<MyData> : IJobParallelFor where MyData : unmanaged, IParallelData<MyData>
{
public NativeArray<MyData> DataArray;
public void Execute(int index)
{
DataArray[index] = DataArray[index].Execute();
}
}
Here's how I'm creating the job (Data is an unmanaged struct):
public override ECTParallelJob<Data> CreateJob(NativeArray<Data> data) => new ECTParallelJob<Data>(data);
As you can see in the following screenshot, it is showing in the Burst Inspector.
I'm getting the following warning still, even though the job is NOT defined in a generic class, and I AM instantiating the job with concrete types:
This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Help would be much appreciated, thank you!