public Color[] FinalizeJob() { if (jobs.Count > 0) { MTTextureBakeJob job = jobs.Dequeue(); Color[] result = job.result.ToArray(); job.DisposeData(); return(result); } return(null); }
public JobHandle NextJob() { if (jobs.Count < 2) { throw new System.Exception("NextJob need 2 jobs"); } MTTextureBakeJob job = jobs.Dequeue(); Color[] result = job.result.ToArray(); job.DisposeData(); MTTextureBakeJob nextJob = jobs.Peek(); nextJob.baseLayer.CopyFrom(result); return(nextJob.Schedule()); }