Niagara SpawnSystemAttached not registered to actor

Hi,

Hope you’re doing great.

It’s a design choice.

SpawnSystemAttached creates and registers the niagara component with the world, so it appears and ticks like any other component, but it’s not added to the actor’s components array. That’s why GetComponentByClass or GetComponents won’t find it.

In case you need track your loop VFX, you have some options:

  1. Create the Niagara component as a subobject of your AActor and manually activate/deactivate it when needed;
  2. Store the returned component pointer as a raw pointer or a TWeakObjectPtr marked with UPROPERTY for lifetime safety;
  3. If you’re spawning many effects, store them in a TArray, which lets you manage and destroy them when needed.

Depending on your implementation, you can also take advantage of the ENCPoolMethod parameter in the overridden SpawnSystemAttached function.

Hope this helps - take care!