Can you change the Color Over Life settings of a particle emitter based on the character that spawns the emitter?

anonymous_user_7381e6cb
Fri, 12 Feb 2021 23:08:57 +0000
C++

I am using the following to spawn a certain emitter, which I have looking great for a default character. However, I would like to reuse the same emitter and just change the “Color Over Life” (to a color more befitting each other character) without having to build whole new emitters. Can I do this in code?

UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), OverlapParticles, GetActorLocation(), FRotator(0.f), true);

I’d like to do something like …

UParticleModuleColorOverLife* Module = Cast(Emitter->GetLODLevel(0)->Modules[0]);

Module->ColorOverLife … // do something here, but everything I try doesn’t work

Any help? Has someone solved this before?

2 posts - 1 participant