I can't find an official UE4 example/tutorial on how to do this in c++.
So far I've got:
Nothing appears...? :S
If I uncomment the DebugMsg() it crashes when the game reaches that line.
Struggling to work out best to debug why it's not spawning. But perhaps I've completlly misunderstood how I should be doing this?
Any pointers would be greatly appreciated
So far I've got:
Code:
#include "NiagaraComponent.h" #include "NiagaraFunctionLibrary.h" // Character init NSDust = LoadObject<UNiagaraSystem>(nullptr, TEXT("/Game/A_Surface_Footstep/Niagara_FX/ParticleSystems/PEN_General1_Dust.PEN_General1_Dust"), nullptr, LOAD_None, nullptr); // Character Jump UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), NSDust, location, FRotator::ZeroRotator, FVector(5, 5 ,5)); // GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, NSDust->GetName());
If I uncomment the DebugMsg() it crashes when the game reaches that line.
Struggling to work out best to debug why it's not spawning. But perhaps I've completlly misunderstood how I should be doing this?
Any pointers would be greatly appreciated
Comment