internal ParticleSystemJobData(ref NativeParticleData nativeData) { this = default(ParticleSystemJobData); this.m_Safety = AtomicSafetyHandle.Create(); this.< count > k__BackingField = nativeData.count; this.< positions > k__BackingField = this.CreateNativeArray3(ref nativeData.positions, this.count); this.< velocities > k__BackingField = this.CreateNativeArray3(ref nativeData.velocities, this.count); this.< rotations > k__BackingField = this.CreateNativeArray3(ref nativeData.rotations, this.count); this.< rotationalSpeeds > k__BackingField = this.CreateNativeArray3(ref nativeData.rotationalSpeeds, this.count); this.< sizes > k__BackingField = this.CreateNativeArray3(ref nativeData.sizes, this.count); this.< startColors > k__BackingField = this.CreateNativeArray <Color32>(nativeData.startColors, this.count); this.< aliveTimePercent > k__BackingField = this.CreateNativeArray <float>(nativeData.aliveTimePercent, this.count); this.< inverseStartLifetimes > k__BackingField = this.CreateNativeArray <float>(nativeData.inverseStartLifetimes, this.count); this.< randomSeeds > k__BackingField = this.CreateNativeArray <uint>(nativeData.randomSeeds, this.count); this.< customData1 > k__BackingField = this.CreateNativeArray4(ref nativeData.customData1, this.count); this.< customData2 > k__BackingField = this.CreateNativeArray4(ref nativeData.customData2, this.count); }
unsafe internal ParticleSystemJobData(ref NativeParticleData nativeData) : this() { m_Safety = AtomicSafetyHandle.Create(); count = nativeData.count; positions = CreateNativeArray3(ref nativeData.positions, count); velocities = CreateNativeArray3(ref nativeData.velocities, count); rotations = CreateNativeArray3(ref nativeData.rotations, count); rotationalSpeeds = CreateNativeArray3(ref nativeData.rotationalSpeeds, count); sizes = CreateNativeArray3(ref nativeData.sizes, count); startColors = CreateNativeArray <Color32>(nativeData.startColors, count); aliveTimePercent = CreateNativeArray <float>(nativeData.aliveTimePercent, count); inverseStartLifetimes = CreateNativeArray <float>(nativeData.inverseStartLifetimes, count); randomSeeds = CreateNativeArray <UInt32>(nativeData.randomSeeds, count); customData1 = CreateNativeArray4(ref nativeData.customData1, count); customData2 = CreateNativeArray4(ref nativeData.customData2, count); }