Version: Unity 6.1 Alpha (6000.1)
LanguageEnglish
  • C#

ParticleSystem.SetParticlesAndTrails

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Declaration

public void SetParticlesAndTrails(out Particle[] particles, ParticleSystem.Trails trailData);

Declaration

public void SetParticlesAndTrails(out Particle[] particles, ParticleSystem.Trails trailData, int size);

Declaration

public void SetParticlesAndTrails(out Particle[] particles, ParticleSystem.Trails trailData, int size, int offset);

Declaration

public void SetParticlesAndTrails(out NativeArray<Particle> particles, ParticleSystem.Trails trailData);

Declaration

public void SetParticlesAndTrails(out NativeArray<Particle> particles, ParticleSystem.Trails trailData, int size);

Declaration

public void SetParticlesAndTrails(out NativeArray<Particle> particles, ParticleSystem.Trails trailData, int size, int offset);

Parameters

particles The input particle buffer, which represents the particle state to apply to particles in this Particle System.
trailData The Trails to apply to the Particle System.
size The number of elements in the particles array that Unity should write to the Particle System.
offset 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.

Description

Sets the particles and the trails of this Particle System.

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: GetParticles, SetParticles, SetTrails.