SetParticlesAndTrails
Sets the particles and the trails of this Particle System.
Read time 4 minutesLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.ParticleSystemModule
SetParticlesAndTrails(Particle[], Trails, int, int)
Sets the particles and the trails of this Particle System.
public void SetParticlesAndTrails(ParticleSystem.Particle[] particles, ParticleSystem.Trails trailData, int size, int offset)
Parameters
The input particle buffer, which represents the particle state to apply to particles in this Particle System.
The Trails to apply to the Particle System.
The number of elements in the particles array that Unity should write to the Particle System.
The location in the particle array to start assigning particles. For example, set the value to 4 to assign particles starting with the 4th particle in the array.
Remarks
Similar to ParticleSystem.SetParticles, if you set the lifetime of a particle to a negative value, Unity removes that particle from the particle system. To keep the particle alive until other trails finish, disable Die With Particles in the Trails module Inspector window. Additional Resources: ParticleSystem.GetParticles, ParticleSystem.SetParticles, ParticleSystem.SetTrails.
SetParticlesAndTrails(Particle[], Trails, int)
Sets the particles and the trails of this Particle System.
public void SetParticlesAndTrails(ParticleSystem.Particle[] particles, ParticleSystem.Trails trailData, int size)
Parameters
The input particle buffer, which represents the particle state to apply to particles in this Particle System.
The Trails to apply to the Particle System.
The number of elements in the particles array that Unity should write to the Particle System.
Remarks
Similar to ParticleSystem.SetParticles, if you set the lifetime of a particle to a negative value, Unity removes that particle from the particle system. To keep the particle alive until other trails finish, disable Die With Particles in the Trails module Inspector window. Additional Resources: ParticleSystem.GetParticles, ParticleSystem.SetParticles, ParticleSystem.SetTrails.
SetParticlesAndTrails(Particle[], Trails)
Sets the particles and the trails of this Particle System.
public void SetParticlesAndTrails(ParticleSystem.Particle[] particles, ParticleSystem.Trails trailData)
Parameters
The input particle buffer, which represents the particle state to apply to particles in this Particle System.
The Trails to apply to the Particle System.
Remarks
Similar to ParticleSystem.SetParticles, if you set the lifetime of a particle to a negative value, Unity removes that particle from the particle system. To keep the particle alive until other trails finish, disable Die With Particles in the Trails module Inspector window. Additional Resources: ParticleSystem.GetParticles, ParticleSystem.SetParticles, ParticleSystem.SetTrails.
SetParticlesAndTrails(NativeArray<Particle>, Trails, int, int)
Sets the particles and the trails of this Particle System.
public void SetParticlesAndTrails(NativeArray<ParticleSystem.Particle> particles, ParticleSystem.Trails trailData, int size, int offset)
Parameters
The input particle buffer, which represents the particle state to apply to particles in this Particle System.
The Trails to apply to the Particle System.
The number of elements in the particles array that Unity should write to the Particle System.
The location in the particle array to start assigning particles. For example, set the value to 4 to assign particles starting with the 4th particle in the array.
Remarks
Similar to ParticleSystem.SetParticles, if you set the lifetime of a particle to a negative value, Unity removes that particle from the particle system. To keep the particle alive until other trails finish, disable Die With Particles in the Trails module Inspector window. Additional Resources: ParticleSystem.GetParticles, ParticleSystem.SetParticles, ParticleSystem.SetTrails.
SetParticlesAndTrails(NativeArray<Particle>, Trails, int)
Sets the particles and the trails of this Particle System.
public void SetParticlesAndTrails(NativeArray<ParticleSystem.Particle> particles, ParticleSystem.Trails trailData, int size)
Parameters
The input particle buffer, which represents the particle state to apply to particles in this Particle System.
The Trails to apply to the Particle System.
The number of elements in the particles array that Unity should write to the Particle System.
Remarks
Similar to ParticleSystem.SetParticles, if you set the lifetime of a particle to a negative value, Unity removes that particle from the particle system. To keep the particle alive until other trails finish, disable Die With Particles in the Trails module Inspector window. Additional Resources: ParticleSystem.GetParticles, ParticleSystem.SetParticles, ParticleSystem.SetTrails.
SetParticlesAndTrails(NativeArray<Particle>, Trails)
Sets the particles and the trails of this Particle System.
public void SetParticlesAndTrails(NativeArray<ParticleSystem.Particle> particles, ParticleSystem.Trails trailData)
Parameters
The input particle buffer, which represents the particle state to apply to particles in this Particle System.
The Trails to apply to the Particle System.
Remarks
Similar to ParticleSystem.SetParticles, if you set the lifetime of a particle to a negative value, Unity removes that particle from the particle system. To keep the particle alive until other trails finish, disable Die With Particles in the Trails module Inspector window. Additional Resources: ParticleSystem.GetParticles, ParticleSystem.SetParticles, ParticleSystem.SetTrails.