---
description: The plugin allows you to configure and spawn Niagara particle systems.
---

# Spawning particles

To configure and spawn particles, create  a `DataAsset` from `DA_EFS_ParticleSystem`.

Once  created the data asset can be added to your component.

<figure><img src="https://1114327333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPDAn56YPaXrBOaYKWGxY%2Fuploads%2FHvIY0UMZDBmc1bxO2dVX%2Fimage.png?alt=media&#x26;token=989af9ed-26b7-473a-80c1-e86d9540f4d6" alt=""><figcaption><p>You can add particle data assets directly from the component</p></figcaption></figure>

Alternatively you can add and remove Particle Data Assets in runtime using `AddStepParticleData` and `RemoveStepParticleData`.

### Content of the Decal Data Asset.

* **Affected Surfaces**: Set the desired surface types for the particles to spawn on. Multiple surfaces can be added here.
* **Niagara System**: Set the niagara system to spawn at the step location.
* **Speed to Spawn**: The system will not be spawned outside of this speed range.
* **Auto Attach**: Attachs the particle system to its instigator.
* **ShouldUsePool**: Pooling the system will prevent the spawn of a new system for each step, and will instead reuse the same one. (your system should not deactivate itself)

### Default Niagara variables

By default the component will try to set variables in your Particle System in case you want to use them.

* (float) **StepSpeed** -> Gets the component owner's velocity in float.
* (Vector3) **StepVelocity** -> Gets the component owner's velocity.
* (Vector3) **StepForward** -> Gets  the component owner's forward vector.
* (Vector3) **StepLocation** -> Gets the step location in world space.

### More advanced uses

For more advanced uses, you can override `OnParticleSpawned` both in Blueprint and C++ to add custom code when a particle sytem is activated.

<figure><img src="https://1114327333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPDAn56YPaXrBOaYKWGxY%2Fuploads%2Fl25tKUwaFUQZpSEw7biJ%2Fimage.png?alt=media&#x26;token=798a217e-f65a-41cc-b78d-efbeff550d18" alt=""><figcaption></figcaption></figure>
