unsafe public static JobHandle ScheduleBatch <T>(this T jobData, ParticleSystem ps, int innerLoopBatchCount, JobHandle dependsOn = new JobHandle()) where T : struct, IJobParticleSystemParallelForBatch { var scheduleParams = ParticleSystemJobUtility.CreateScheduleParams(ref jobData, ps, dependsOn, IJobParticleSystemParallelForBatchExtensions.GetReflectionData <T>()); var handle = JobsUtility.ScheduleParallelForDeferArraySize(ref scheduleParams, innerLoopBatchCount, ps.GetManagedJobData(), null); ps.SetManagedJobHandle(handle); return(handle); }
unsafe public static JobHandle Schedule <T>(this T jobData, ParticleSystem ps, JobHandle dependsOn = new JobHandle()) where T : struct, IJobParticleSystem { var scheduleParams = ParticleSystemJobUtility.CreateScheduleParams(ref jobData, ps, dependsOn, IJobParticleSystemExtensions.GetReflectionData <T>()); var handle = ParticleSystem.ScheduleManagedJob(ref scheduleParams, ps.GetManagedJobData()); ps.SetManagedJobHandle(handle); return(handle); }
internal static IntPtr GetReflectionData <T>() where T : struct, IJobParticleSystemParallelForBatch { ParticleSystemParallelForBatchJobStruct <T> .Initialize(); var reflectionData = ParticleSystemParallelForBatchJobStruct <T> .jobReflectionData.Data; ParticleSystemJobUtility.CheckReflectionDataCorrect(reflectionData); return(reflectionData); }