# SetParticles

> Sets the particles of this Particle System.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/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.7/script-reference/unityengine/particlesystem/particle)): The input particle buffer, which represents the particle state to apply to particles in this Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that Unity should write to the Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): 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

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.7/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.7/script-reference/unityengine/particlesystem/particle)): The input particle buffer, which represents the particle state to apply to particles in this Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that Unity should write 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.7/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.7/script-reference/unityengine/particlesystem/particle)): The input particle buffer, which represents the particle state to apply to particles in this 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.7/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.7/script-reference/unity/collections/nativearray1)): The input particle buffer, which represents the particle state to apply to particles in this Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that Unity should write to the Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): 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

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.7/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.7/script-reference/unity/collections/nativearray1)): The input particle buffer, which represents the particle state to apply to particles in this Particle System.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements in the particles array that Unity should write 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.7/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.7/script-reference/unity/collections/nativearray1)): The input particle buffer, which represents the particle state to apply to particles in this 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.7/script-reference/unityengine/particlesystem/getparticles.md)
