# SetParticles

> Sets the particles of this Particle System.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.ParticleSystemModule

## SetParticles(Particle\[], int, int)

Sets the particles of this Particle System.

```csharp
public void SetParticles(ParticleSystem.Particle[] particles, int size, int offset)
```

### Parameters

**** (\[Particle\[]]\(/engine/6000.0/script-reference/unityengine/particlesystem/particle)): Input particle buffer, containing the desired particle state.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that is written to the Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The offset into the destination particle list, to assign these particles.

### Remarks

Setting the lifetime of a particle to a negative value will result in that particle being removed from the Particle System. Additional Resources: [ParticleSystem.GetParticles](/engine/6000.0/script-reference/unityengine/particlesystem/getparticles.md).

## SetParticles(Particle\[], int)

Sets the particles of this Particle System.

```csharp
public void SetParticles(ParticleSystem.Particle[] particles, int size)
```

### Parameters

**** (\[Particle\[]]\(/engine/6000.0/script-reference/unityengine/particlesystem/particle)): Input particle buffer, containing the desired particle state.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that is written to the Particle System.

### Remarks

Setting the lifetime of a particle to a negative value will result in that particle being removed from the Particle System. Additional Resources: [ParticleSystem.GetParticles](/engine/6000.0/script-reference/unityengine/particlesystem/getparticles.md).

## SetParticles(Particle\[])

Sets the particles of this Particle System.

```csharp
public void SetParticles(ParticleSystem.Particle[] particles)
```

### Parameters

**** (\[Particle\[]]\(/engine/6000.0/script-reference/unityengine/particlesystem/particle)): Input particle buffer, containing the desired particle state.

### Remarks

Setting the lifetime of a particle to a negative value will result in that particle being removed from the Particle System. Additional Resources: [ParticleSystem.GetParticles](/engine/6000.0/script-reference/unityengine/particlesystem/getparticles.md).

## SetParticles(NativeArray\<Particle>, int, int)

Sets the particles of this Particle System.

```csharp
public void SetParticles(NativeArray<ParticleSystem.Particle> particles, int size, int offset)
```

### Parameters

**** (\[NativeArray\<Particle>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Input particle buffer, containing the desired particle state.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that is written to the Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The offset into the destination particle list, to assign these particles.

### Remarks

Setting the lifetime of a particle to a negative value will result in that particle being removed from the Particle System. Additional Resources: [ParticleSystem.GetParticles](/engine/6000.0/script-reference/unityengine/particlesystem/getparticles.md).

## SetParticles(NativeArray\<Particle>, int)

Sets the particles of this Particle System.

```csharp
public void SetParticles(NativeArray<ParticleSystem.Particle> particles, int size)
```

### Parameters

**** (\[NativeArray\<Particle>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Input particle buffer, containing the desired particle state.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that is written to the Particle System.

### Remarks

Setting the lifetime of a particle to a negative value will result in that particle being removed from the Particle System. Additional Resources: [ParticleSystem.GetParticles](/engine/6000.0/script-reference/unityengine/particlesystem/getparticles.md).

## SetParticles(NativeArray\<Particle>)

Sets the particles of this Particle System.

```csharp
public void SetParticles(NativeArray<ParticleSystem.Particle> particles)
```

### Parameters

**** (\[NativeArray\<Particle>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Input particle buffer, containing the desired particle state.

### Remarks

Setting the lifetime of a particle to a negative value will result in that particle being removed from the Particle System. Additional Resources: [ParticleSystem.GetParticles](/engine/6000.0/script-reference/unityengine/particlesystem/getparticles.md).
