몰랐는데 한 번도 C++로 나이아가라를 사용해본적 없었다
그래서 작성하는 나이아가라 사용법~ (파티클과 다를 바가 없다)
이거 참고함 >> 링크텍스트
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Niagara" });
#include "NiagaraFunctionLibrary.h"
#include "NiagaraComponent.h"
UNiagaraSystem* NiagaraSystem = LoadObject<UNiagaraSystem>(nullptr, TEXT("Path"));
UNiagaraComponent* NiagaraComponent = UNiagaraFunctionLibrary::SpawnSystemAtLocation(GetWorld(), NiagaraSystem, GetActorLocation(), GetActorRotation());
}
#include "Particles/ParticleSystem.h"
UParticleSystem* ParticleSystem = LoadObject<UParticleSystem>(nullptr, TEXT("/Game/JIU/Effects/P_Sparks_E.P_Sparks_E"));
ParticleComponent = UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), UParticleSystemComponent* ParticleSystem, GetActorLocation(), GetActorRotation());
다음부턴 헷갈리지 말자!