示例#1
0
 unsafe internal ParticleSystemNativeArray4(ref JobDataInternal.Array4 ptrs, int count, object safetyHandle)
 {
     x = ParticleSystemJobData.CreateNativeArray <float>(ptrs.x, count, safetyHandle);
     y = ParticleSystemJobData.CreateNativeArray <float>(ptrs.y, count, safetyHandle);
     z = ParticleSystemJobData.CreateNativeArray <float>(ptrs.z, count, safetyHandle);
     w = ParticleSystemJobData.CreateNativeArray <float>(ptrs.w, count, safetyHandle);
 }
示例#2
0
        public static unsafe void ExecuteProcessParticleSystem(ref T data, IntPtr particleSystemPtr, IntPtr unusedPtr, ref JobRanges ranges, int jobIndex)
        {
            JobDataInternal jobDataInternal;

            UnsafeUtility.CopyPtrToStructure((void *)particleSystemPtr, out jobDataInternal);

            object safetyHandle;
            ParticleSystemJobData jobData = new ParticleSystemJobData(ref jobDataInternal, out safetyHandle);

            data.ProcessParticleSystem(jobData);

            AtomicSafetyHandle.CheckDeallocateAndThrow((AtomicSafetyHandle)safetyHandle);
            AtomicSafetyHandle.Release((AtomicSafetyHandle)safetyHandle);
        }