static IntPtr GetReflectionData <T>() where T : struct, IJob { JobStruct <T> .Initialize(); var reflectionData = JobStruct <T> .jobReflectionData.Data; CheckReflectionDataCorrect(reflectionData); return(reflectionData); }
public static unsafe void Run <T, U0>(this T jobData, ComponentGroupArray <U0> array) where T : struct, IJobProcessEntities <U0> where U0 : struct { JobStruct <T, U0> fullData; fullData.Data = jobData; fullData.Array = array.m_Data; var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref fullData), JobStruct <T, U0> .Initialize(), new JobHandle(), ScheduleMode.Run); var entityCount = array.Length; JobsUtility.ScheduleParallelFor(ref scheduleParams, entityCount, entityCount); }
public static unsafe JobHandle Schedule <T, U0>(this T jobData, ComponentGroupArray <U0> array, int innerloopBatchCount, JobHandle dependsOn = new JobHandle()) where T : struct, IJobProcessEntities <U0> where U0 : struct { JobStruct <T, U0> fullData; fullData.Data = jobData; fullData.Array = array.m_Data; var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref fullData), JobStruct <T, U0> .Initialize(), dependsOn, ScheduleMode.Batched); return(JobsUtility.ScheduleParallelFor(ref scheduleParams, array.Length, innerloopBatchCount)); }
unsafe public static void Run <T>(this T jobData) where T : struct, IJob { var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), JobStruct <T> .Initialize(), new JobHandle(), ScheduleMode.Run); JobsUtility.Schedule(ref scheduleParams); }
unsafe public static JobHandle Schedule <T>(this T jobData, JobHandle dependsOn = new JobHandle()) where T : struct, IJob { var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), JobStruct <T> .Initialize(), dependsOn, ScheduleMode.Batched); return(JobsUtility.Schedule(ref scheduleParams)); }
public static void EarlyJobInit <T>() where T : struct, IJob { JobStruct <T> .Initialize(); }