コード例 #1
0
        private static IntPtr GetReflectionData <T>()
            where T : struct, IJobFor
        {
            ForJobStruct <T> .Initialize();

            var reflectionData = ForJobStruct <T> .jobReflectionData.Data;

            CheckReflectionDataCorrect(reflectionData);
            return(reflectionData);
        }
コード例 #2
0
        unsafe public static void Run <T>(this T jobData, int arrayLength) where T : struct, IJobFor
        {
            var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ForJobStruct <T> .Initialize(false), new JobHandle(), ScheduleMode.Run);

            JobsUtility.ScheduleParallelFor(ref scheduleParams, arrayLength, arrayLength);
        }
コード例 #3
0
        unsafe public static JobHandle ScheduleParallel <T>(this T jobData, int arrayLength, int innerloopBatchCount, JobHandle dependency) where T : struct, IJobFor
        {
            var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ForJobStruct <T> .Initialize(true), dependency, ScheduleMode.Batched);

            return(JobsUtility.ScheduleParallelFor(ref scheduleParams, arrayLength, innerloopBatchCount));
        }
コード例 #4
0
 public static void EarlyJobInit <T>()
     where T : struct, IJobFor
 {
     ForJobStruct <T> .Initialize();
 }