How do I play a Niagara effect from c++?

I was wondering if there was a way to spawn a niagara system from C++ before I try to do it in blueprints (I prefer to do it in C++).

1 Like

I’m having the same problem with this. I asked around about a month ago and you have to add Niagara to the .build file. However my IDE (VS) is looking for the plugin within my project files rather than the engine files. I can no longer find that thread however.

Please look at NiagaraFunctionLibrary.h.
Does this solve it?

Thanks GoobGuntz and kamitani_08 for helping me figure this out! NiagaraFunctionLirary.h allowed me to spawn Niagara effects, and you have to put “Niagara” in the build.cs file. I was able to spawn a system like this:

UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), SpawnEffect, MeshComp->GetComponentLocation(), MeshComp->GetComponentRotation());
1 Like

Are there any news?