Пример #1
0
        unsafe public static JobHandle ScheduleBatch <T>(this T jobData, ParticleSystem ps, int innerLoopBatchCount, JobHandle dependsOn = new JobHandle()) where T : struct, IJobParticleSystemParallelForBatch
        {
            var scheduleParams = CreateScheduleParams(ref jobData, ps, dependsOn, ParticleSystemParallelForBatchJobStruct <T> .Initialize());
            var handle         = JobsUtility.ScheduleParallelForDeferArraySize(ref scheduleParams, innerLoopBatchCount, ps.GetManagedJobData(), null);

            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);
        }
 public static void EarlyJobInit <T>()
     where T : struct, IJobParticleSystemParallelForBatch
 {
     ParticleSystemParallelForBatchJobStruct <T> .Initialize();
 }
        public static JobHandle ScheduleBatch <T>(this T jobData, ParticleSystem ps, int innerLoopBatchCount, JobHandle dependsOn = default(JobHandle)) where T : struct, IJobParticleSystemParallelForBatch
        {
            JobsUtility.JobScheduleParameters jobScheduleParameters = IParticleSystemJobExtensions.CreateScheduleParams <T>(ref jobData, ps, dependsOn, ParticleSystemParallelForBatchJobStruct <T> .Initialize());
            JobHandle jobHandle = JobsUtility.ScheduleParallelForDeferArraySize(ref jobScheduleParameters, innerLoopBatchCount, ps.GetManagedJobData(), null);

            ps.SetManagedJobHandle(jobHandle);
            return(jobHandle);
        }