Hello,
so I’ve added particles to my gun thanks to GameplayStatics::SpawnEmitterAttached. The problem is that every time they’re spawned, they produce this error that logs on top of my play screen:
GameplayStatics::SpawnEmitterAttached spawned potentially immortal particle system! /Game/Levels/UEDPIE_0_Sandbox.Sandbox:PersistentLevel.BP_Deagle_C_0.ParticleSystemComponent_0 (/Game/Blueprints/Animations/PS_Muzzle.PS_Muzzle) may stay in world despite never spawning particles after burst spawning is over.
So far, I haven’t had any issue with my game so it might as well be a false positive. It is however concerning and that is why I’m looking for help here.
Spawning particles code:
if (!MuzzleParticle) {return;} UGameplayStatics::SpawnEmitterAttached( MuzzleParticle, WeaponMesh, TEXT("MuzzleSocket"), WeaponMesh->GetSocketLocation(TEXT("MuzzleSocket")), WeaponMesh->GetSocketRotation(TEXT("MuzzleSocket")), EAttachLocation::KeepWorldPosition);
I’m calling that function in blueprint at the start of my shooting animation.