public static JobHandle Schedule(VertexCalculator vertexCalculator, NativeArray <TopCellInfo> infoArray, NativeList <float3> vertices, JobHandle dependOn) { var vertexJob = new CalculateVerticesJob <VertexCalculator> { vertexCalculator = vertexCalculator, infoArray = infoArray, vertices = vertices.AsDeferredJobArray() }; return(vertexJob.Schedule(infoArray.Length, CalculateVertexBatchNum, dependOn)); }
public static JobHandle ScheduleCalculateVerticesJob <T>(T vertexCalculator, NativeArray <TopCellInfo> infoArray, NativeList <float3> vertices, JobHandle lastHandle) where T : struct, IVertexCalculator => CalculateVerticesJob <T> .Schedule(vertexCalculator, infoArray, vertices, lastHandle);