UGameplayStatics::SpawnEmitterAtLocation
#include "Kismet/GameplayStatics.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Spawns a Cascade (Legacy) particle system at a world location as a fire-and-forget effect. The component is automatically destroyed when the effect completes if bAutoDestroy is true.
Caveats & Gotchas
- • This function is for legacy Cascade particle systems (UParticleSystem). For Niagara effects, use UNiagaraFunctionLibrary::SpawnSystemAtLocation instead.
- • Does not replicate. Each machine must call this independently to see the effect — typically called on all clients via a NetMulticast RPC or from a replicated event.
- • The returned UParticleSystemComponent* may be null if the particle system failed to spawn (e.g., null template, world not ready). Always null-check before using it to set parameters.
Signature
static ENGINE_API UParticleSystemComponent* SpawnEmitterAtLocation(const UObject* WorldContextObject, UParticleSystem* EmitterTemplate, FVector Location, FRotator Rotation = FRotator::ZeroRotator, FVector Scale = FVector(1.f), bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivateSystem = true); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | const UObject* | Object used to retrieve the world context. | — |
| EmitterTemplate | UParticleSystem* | Cascade particle system asset to spawn. | — |
| Location | FVector | World-space location to spawn the emitter. | — |
| Rotation | FRotator | World-space rotation of the emitter. | FRotator::ZeroRotator |
| Scale | FVector | Scale applied to the particle system. | FVector(1.f) |
| bAutoDestroy | bool | Whether the component destroys itself when the system completes. | true |
| PoolingMethod | EPSCPoolMethod | Controls PSC pooling behavior. Defaults to None. | EPSCPoolMethod::None |
| bAutoActivateSystem | bool | Whether to automatically activate the particle system on spawn. | true |
Return Type
UParticleSystemComponent* Example
Play a hit impact effect C++
UGameplayStatics::SpawnEmitterAtLocation(
this,
HitEffectTemplate,
HitLocation,
HitNormal.Rotation()
); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?