コード例 #1
0
 public Color[] FinalizeJob()
 {
     if (jobs.Count > 0)
     {
         MTTextureBakeJob job    = jobs.Dequeue();
         Color[]          result = job.result.ToArray();
         job.DisposeData();
         return(result);
     }
     return(null);
 }
コード例 #2
0
        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());
        }