struct

ParticleEmitterComponent

Module
Particles
Header
#include "Particles/Components/ParticleEmitterComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
boolenabledDefault true.
floatsignificanceSignificance: when the emitter budget (r.Effects max active emitters, overdraw budget) bites, emitters are admitted by significance — this priority over distance — instead of nearest-first, so a far muzzle flash outranks near ambient dust. Always Relevant bypasses the budget entirely (the one effect a gameplay beat must not lose). Default 50.0f.
boolalwaysRelevantDefault false.
boolloopDefault true.
floatdurationDuration of emission (if not looping) Default 5.0f.
boolplayOnAwakeDefault true.
floatemissionRateParticles per second Default 10.0f.
uint32_tmaxParticlesPool size Default Particles::DefaultMaxParticles.
intburstCountParticles to emit at start Default 0.
floatlifetimeMinDefault 1.0f.
floatlifetimeMaxDefault 2.0f.
Vec3startVelocityStart values (randomized between min/max) Default Vec3(0.0f, 1.0f, 0.0f).
floatstartSpeedMinDefault 1.0f.
floatstartSpeedMaxDefault 2.0f.
Vec2startSizeMinDefault Vec2(0.1f, 0.1f).
Vec2startSizeMaxDefault Vec2(0.2f, 0.2f).
Vec4startColorDefault Vec4(1.0f, 1.0f, 1.0f, 1.0f).
std::stringparticlePathLinked .particle asset. The modules vector below is runtime-only, so without this scene-authored module sets were lost on save/load. Scene deserialize re-clones the asset's modules onto the emitter (see Scene::DeserializeFromDocument), making authored particles persist.
uint32_tseedZero means "seed from the platform entropy source at pool init", i.e. a different effect every run. Any non-zero value makes the emitter reproducible across runs, machines and networked clients. Default 0.
ParticleSimulationModesimulationModeSimulation mode handled by the custom (de)serialize hooks above. Default ParticleSimulationMode::CPU.
ParticleRenderModerenderModeBillboard quads (default) or an instanced mesh per particle. Mesh mode submits through the scene's static-mesh path, so mesh particles are deferred-lit by the whole scene without a lit toggle. Default ParticleRenderMode::Billboard.
std::stringmeshPathMesh-mode source. A model asset ref wins; otherwise the primitive named by meshType is used (cube/sphere/cylinder/cone/capsule/torus/plane/quad), mirroring the MeshRenderer resolution contract.
std::stringmeshTypeDefault "cube".
ParticleShadingModeshadingModeBillboard shading. Unlit keeps the classic emissive look; Lit runs a simplified forward loop (main directional N·L + ambient/GI) so smoke and dust sit in the scene's lighting. Mesh mode is always deferred-lit. Default ParticleShadingMode::Unlit.
BillboardModebillboardModeDefault BillboardMode::Camera.
floatvelocityStretchStretched billboard tuning. The quad's long axis aligns with the particle velocity and its length grows with speed: stretch = clamp(1 + speed * velocityStretch, 1, stretchMax). Only used when billboardMode is Stretched. Default 0.15f.
floatstretchMaxDefault 8.0f.
ParticleBlendModeblendModeDefault ParticleBlendMode::Alpha.
booldepthTestDefault true.
std::stringtexturePath
uint32_tsubUVColumnsFlipbook grid over the particle texture; the frame is picked from the particle's normalized age and baked into the quad UVs at submission. Default 1.
uint32_tsubUVRowsDefault 1.
floatsoftFadeDistanceWorld-space distance over which a particle fades out as it approaches the opaque surface behind it. Zero keeps the hard depth clip. Default 0.0f.
floatcullDistanceDistance past which the emitter stops submitting geometry (0 = never). Default 0.0f.
UUIDtextureIDAuthored by the .particle asset; resolved to texture by the Scene.
Ref<Image2D>texture
std::stringresolvedTextureKey
Ref<GPUMesh>meshMesh-mode geometry resolved from meshPath/meshType by the Scene.
std::stringresolvedMeshKey
std::vector<Scope<ParticleModule>>modulesModules (owned pointers)
ParticlePoolpoolRuntime state (managed by ParticleSystem)
ParticleRandomrandom
floatemissionAccumulatorDefault 0.0f.
floatplaybackTimeDefault 0.0f.
boolisPlayingDefault false.
boolburstFiredDefault false.
boolneedsInitializationDefault true.
boolgpuModeWarnedDefault false.
void*gpuStateGPU particle state (managed by GPUParticleRenderer, not serialized) Default nullptr.
std::vector<Scope<ParticleEmitterComponent>>childrenThe other emitters of a multi-emitter .vfx system and the children of this emitter's SubEmitter modules, owned here and simulated and drawn with it at its transform. Rebuilt from the asset whenever the scene resolves the emitter; never serialized.
std::stringemitterNameThe emitter's name inside its system, which SubEmitter modules address.
boolspawnFromEventsOnlyA sub-emitter child: no rate or burst of its own, it spawns only where its parent's events put particles. Default false.
std::vector<FParticleEvent>birthEventsThis frame's events, by EParticleEventType, filled only while a SubEmitter module listens for that type.
std::vector<FParticleEvent>deathEvents
std::vector<FParticleEvent>collisionEvents
boolgpuEventsWarnedDefault false.
boolgpuExpressionWarnedDefault false.

Constructors

SignatureNameDescription
ParticleEmitterComponent() = defaultParticleEmitterComponentCopy constructor needs special handling for unique_ptr
ParticleEmitterComponent(const ParticleEmitterComponent& other) : enabled(other.…ParticleEmitterComponentForce re-init on copy
ParticleEmitterComponent(ParticleEmitterComponent&&) = defaultParticleEmitterComponent

Public functions

ReturnsNameDescription
std::vector<FParticleEvent>&Events
voidForEachInTree
voidPlay
voidStop
voidRestart
voidClear
size_tGetParticleCount
boolIsAlive
floatGetProgress
T*AddModule
T*GetModule
voidRemoveModule
voidInitializePool
voidCloneModulesFromClone all modules (for prefab instantiation), and the child emitters with them: their SubEmitter slots index into this list.
ParticleEmitterComponent&operator=
ParticleEmitterComponent&operator=

Function details

ParticleEmitterComponent

C++
ParticleEmitterComponent() = default

Copy constructor needs special handling for unique_ptr

ParticleEmitterComponent

C++
ParticleEmitterComponent(const ParticleEmitterComponent& other) : enabled(other.enabled), loop(other.loop), duration(other.duration), playOnAwake(other.playOnAwake), emissionRate(other.emissionRate), maxParticles(other.maxParticles), burstCount(other.burstCount), lifetimeMin(other.lifetimeMin), lifetimeMax(other.lifetimeMax), startVelocity(other.startVelocity), startSpeedMin(other.startSpeedMin), startSpeedMax(other.startSpeedMax), startSizeMin(other.startSizeMin), startSizeMax(other.startSizeMax), startColor(other.startColor), particlePath(other.particlePath), seed(other.seed), simulationMode(other.simulationMode), renderMode(other.renderMode), meshPath(other.meshPath), meshType(other.meshType), shadingMode(other.shadingMode), billboardMode(other.billboardMode), velocityStretch(other.velocityStretch), stretchMax(other.stretchMax), blendMode(other.blendMode), depthTest(other.depthTest), texturePath(other.texturePath), subUVColumns(other.subUVColumns), subUVRows(other.subUVRows), softFadeDistance(other.softFadeDistance), cullDistance(other.cullDistance), textureID(other.textureID), texture(other.texture), resolvedTextureKey(other.resolvedTextureKey), needsInitialization(true) , emitterName(other.emitterName), spawnFromEventsOnly(other.spawnFromEventsOnly)

Force re-init on copy

ParticleEmitterComponent

C++
ParticleEmitterComponent(ParticleEmitterComponent&&) = default

Events

C++
std::vector<FParticleEvent>& Events(EParticleEventType type)

ForEachInTree

C++
template<typename Fn> void ForEachInTree(Fn&& fn)

Play

C++
void Play()

Stop

C++
void Stop()

Restart

C++
void Restart()

Clear

C++
void Clear()

GetParticleCount

C++
size_t GetParticleCount() const

IsAlive

C++
bool IsAlive() const

GetProgress

C++
float GetProgress() const

AddModule

C++
template<typename T, typename... Args> T* AddModule(Args&&... args)

GetModule

C++
template<typename T> T* GetModule()

RemoveModule

C++
void RemoveModule(size_t index)

InitializePool

C++
void InitializePool()

CloneModulesFrom

C++
void CloneModulesFrom(const ParticleEmitterComponent& other)

Clone all modules (for prefab instantiation), and the child emitters with them: their SubEmitter slots index into this list.

operator=

C++
ParticleEmitterComponent& operator=(const ParticleEmitterComponent& other)

operator=

C++
ParticleEmitterComponent& operator=(ParticleEmitterComponent&&) = default
Generated from Particles/Components/ParticleEmitterComponent.h via particles.json · Oct 31, 2026Version 1.0.0