Scripting API

ParticleSystem

class in UnityEngine · UnityEngine.ParticleSystemModule · inherits from Component

45 of 57 of Unity's membersUnity's documentation
In Tassix

A particle system, simulated on the main thread after LateUpdate: emission over time and distance, bursts, emission shapes, start values, gravity, and the velocity, force, color, size and rotation over lifetime modules. Particles emitted part way through a frame are stepped for the rest of it; velocities change before positions (semi-implicit), and dead particles are replaced by the last one, as in Unity. Random values come from our own generator (Unity's differ). Systems always simulate, visible or not.

Properties 35

CollisionModule collision { get; }
EnabledModule colorBySpeed { get; }
ColorOverLifetimeModule colorOverLifetime { get; }
EnabledModule customData { get; }
EmissionModule emission { get; }
EnabledModule externalForces { get; }
ForceOverLifetimeModule forceOverLifetime { get; }
bool has3DParticleRotations { get; }
bool hasNonUniformParticleSizes { get; }
EnabledModule inheritVelocity { get; }
bool isEmitting { get; }
bool isPaused { get; }
bool isPlaying { get; }
bool isStopped { get; }
EnabledModule lifetimeByEmitterSpeed { get; }
EnabledModule lights { get; }
LimitVelocityOverLifetimeModule limitVelocityOverLifetime { get; }
MainModule main { get; }
NoiseModule noise { get; }
int particleCount { get; }
bool proceduralSimulationSupported { get; }
uint randomSeed { get; set; }
EnabledModule rotationBySpeed { get; }
RotationOverLifetimeModule rotationOverLifetime { get; }
ShapeModule shape { get; }
EnabledModule sizeBySpeed { get; }
SizeOverLifetimeModule sizeOverLifetime { get; }
EnabledModule subEmitters { get; }
TextureSheetAnimationModule textureSheetAnimation { get; }
float time { get; set; }
float totalTime { get; }
TrailModule trails { get; }
EnabledModule trigger { get; }
bool useAutoRandomSeed { get; set; }
VelocityOverLifetimeModule velocityOverLifetime { get; }

Methods 9

void Clear()
void Clear(bool withChildren)
void Emit(int count)
void Emit(EmitParams emitParams, int count)
int GetParticles(Particle[] particles)
int GetParticles(Particle[] particles, int size)
int GetParticles(Particle[] particles, int size, int offset)
bool IsAlive()
bool IsAlive(bool withChildren)
void Pause()
void Pause(bool withChildren)
void Play()
void Play(bool withChildren)
void SetParticles(Particle[] particles)
void SetParticles(Particle[] particles, int size)
void SetParticles(Particle[] particles, int size, int offset)
void Simulate(float t)
void Simulate(float t, bool withChildren)
void Simulate(float t, bool withChildren, bool restart)
void Simulate(float t, bool withChildren, bool restart, bool fixedTimeStep)

Advances by t seconds and leaves the system paused. With fixed steps, it steps Time.fixedDeltaTime at a time and keeps what's left over for the next call, as Unity does.

void Stop()
void Stop(bool withChildren)
void Stop(bool withChildren, ParticleSystemStopBehavior stopBehavior)

Not in Tassix yet 12

AllocateAxisOfRotationAttribute AllocateCustomDataAttribute AllocateMeshIndexAttribute GetCustomParticleData GetPlaybackState GetTrails ResetPreMappedBufferMemory SetCustomParticleData SetMaximumPreMappedBufferCounts SetParticlesAndTrails SetPlaybackState TriggerSubEmitter

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.