how to pass data from one dependecy group to the next?

for (int i=0..30) // wouldn't that be nice to have that syntax in c#
{
   NativeArray<float> input = new NativeArray<float>(someArray, Allocator.Persistent);
   NativeArray<float> output = new NativeArray<float>(some.Length, Allocator.Persistent);
   new JobA()
          {
             input = input,
             output = output
          }.Schedule(30,5);
}
var dependency = JobHandle.CombineDependencies(handlesJobA);
for (int i=0..10) // wanna
{
   NativeArray<float> output = new NativeArray<float>(some.Length, Allocator.Persistent);
   new JobB()
          {
             input = somethingFromJobA,
             output = output
          }.Schedule(10,2,dependency);
}

How do I get some data from jobA to jobB?

You pass the NativeArrays that you created on line 5 as inputs to the job on line 18.

cool thanks

this jobs stuff is great, my code got much cleaner just by jobifying

so I see that you can’t pass references to a job, and it seems that NativeArrays can’t have class as type, how will operations on transforms or physics happen inside a job?
And what about texture/compute shader read async operation, will they be accessible within a job?

Perhaps via the TransformAccess and TransformAccessArray APIs?

thanks peter, it was lurking inside engine. do you know why jobs’ scaffolding in unity assembly and accesses are in engine?
I see that Access has no constructor that takes conveniently a transform while array does… I’m sure it’ll come soon and it’s cool to see the API’s early days