ParticleSystemsimulates on the CPU in managed code, after LateUpdate:- the main module, emission by time and distance with bursts (cycles, intervals, probability), and the common shapes;
- velocity, limit velocity, force, color, size and rotation over lifetime, and grid texture sheets;
MinMaxCurveandMinMaxGradientin every mode, andGradient(blend and fixed).
- The API: Play, Pause, Stop with its behaviours, Clear, Simulate (fixed steps with the remainder carried, as Unity), Emit with
EmitParams, Get/SetParticles, andParticle. - Timing follows Unity's trace:
- emission accumulates and emits whole particles with sub-frame ages;
- integration is semi-implicit;
- a non-looping system's last step emits nothing by rate;
- dead particles swap with the last one.
ParticleSystemRenderersends each frame's particles (world space, sorted by its sort mode) to native.- The renderer draws them per view after transparent geometry:
- instanced quads (billboard, horizontal, vertical, or stretched along velocity) with rotation, texture-sheet UVs and fog;
- depth-tested without writing depth;
- blended alpha, additive, premultiplied or multiplied, chosen from the material's particle shader.
- Unity scenes import particle systems from their serialized modules. The editor's JSON form, and so MCP's
scene_editandscene_query, carries the modules as fields ("main","emission","shape"...). Components another component already added (a system's renderer) take the scene's settings. - A new
particlesconformance scenario records:- defaults, curve and gradient evaluation;
- a stream, bursts and hand-emitted particles frame by frame;
- pause and resume, stopping,
SimulateandClear; - a system imported from a Unity scene (NEParticleScene). Its times sit between frames: Unity's particle clock runs a hair under 0.02 s a frame, so a deadline on a frame boundary is a rounding tie. 39 scenarios pass in both runs.
- GPU tests cover rotated billboards, additive and multiplied blending, depth against opaque geometry, and stretching. An MCP e2e test covers a system set up through module fields showing in a screenshot.
- Not yet: noise, collision, trails, lights, sub-emitters and the other modules (settings only), mesh particles (drawn as billboards), soft particles, custom vertex streams, saving particle edits back to
.unityfiles. - Next: NavMesh (baking and
NavMeshAgent), or 2D lights.
Phase 5 · Slice 14 ·