SParticleSystem
Index
Functions Index
bool IsAlive (bool withChildren)
void Emit (int count)
void Simulate (float time)
void SetTriggerParticles (SParticleSystemTriggerEventType type, SParticle[] sp)
SParticle[] GetTriggerParticles (SParticleSystemTriggerEventType type)
Properties Index
float StartDelay get
set
Start delay in seconds. Use this to delay when playback starts on the system.
bool IsPlaying get
Determines whether the Particle System is playing.
bool IsEmitting get
Determines whether the Particle System is emitting particles. A Particle System may stop emitting when its emission module has finished, it has been paused or if the system has been stopped.
bool IsStopped get
Determines whether the Particle System is stopped.
bool IsPaused get
Determines whether the Particle System is paused.
bool Loop get
set
Specifies whether the Particle System is looping. If you disable looping on a playing Particle System, it stops at the end of the current loop.
bool PlayOnAwake get
set
If set to true, the Particle System will automatically start playing on startup. Note that this setting is shared between all Particle Systems in the current particle effect.
float Time get
set
Playback position in seconds. Use this to read current playback time or to seek to a new playback time.
float Duration get
The duration of the Particle System in seconds.
float PlaybackSpeed get
set
The playback speed of the Particle System. 1 is normal playback speed.
int ParticleCount get
The current number of particles.
bool EnableEmission get
set
When set to false, the Particle System will not emit particles.
float EmissionRate get
set
The rate of particle emission.
float EmissionRateOverTime get
set
The rate at which the emitter spawns new particles over time.
float EmissionRateOverDistance get
set
The rate at which the emitter spawns new particles over distance. The emitter only spawns new particles when it moves.
float StartSpeed get
set
The initial speed of particles when the Particle System first spawns them.
float StartSize get
set
The initial size of particles when the Particle System first spawns them.
SColor StartColor get
set
The initial color of particles when the Particle System first spawns them.
float StartRotation get
set
The initial rotation of particles when emitted. When using curves, this value acts as a scale on the curve. Note that the value should be given in radians.
SVector StartRotation3D get
set
The initial 3D rotation of particles when emitted. When using curves, this value acts as a scale on the curves. Note that the values are Euler angles and should be given in radians.
float StartLifetime get
set
The total lifetime in seconds that particles will have when emitted. When using curves, this value acts as a scale on the curve. This value is set in the particle when it is created by the Particle System.
float GravityModifier get
set
A scale that this Particle System applies to gravity.
int MaxParticles get
set
The maximum number of particles to emit.
uint RandomSeed get
set
Override the random seed used for the Particle System emission.
bool UseAutoRandomSeed get
set
Controls whether the Particle System uses an automatically-generated random number to seed the random number generator. If set to true, the Particle System will generate a new random seed each time it is played. If set to false, ParticleSystem.randomSeed will be used instead, allowing for a constant seed (useful if you want your particles to play in exactly the same way each time) or user-defined random value (for example, you may want to cycle through an array of seeds).
SGameObject GameObject get
Functions
Play
void Play (bool withChildren) void Play ()
Sets the Particle Systems into play mode and enables emitting (if it has been disabled).
If the Particle System has been paused, then this resumes playing from the previous time. If the Particle System has stopped, then the system starts from time 0, and, if it is relevant, the startDelay is applied. Parameter withChildren: Plays all child Particle Systems as well.
Stop
void Stop (bool withChildren) void Stop ()
Stops playing the Particle System. Parameter withChildren: Plays all child Particle Systems as well.
Pause
void Pause (bool withChildren) void Pause ()
Pauses the system so no new particles are emitted and the existing particles are not updated. Parameter: withChildren: Pauses all child Particle Systems as well.
Clear
void Clear (bool withChildren) void Clear ()
Remove all particles in the Particle System.
This method also removes the particles from any linked sub-emitters. Use the withChildren parameter to remove particles from child Particle Systems that are not sub-emitters of the system.
IsAlive
bool IsAlive (bool withChildren)
Returns True if the Particle System contains live particles or is still creating new particles. False if the Particle System has stopped emitting particles and all particles are dead. Parameter withChildren: checks all child Particle Systems as well.
Emit
void Emit (int count)
Emit 'count' particles immediately.
Simulate
void Simulate (float time)
Fast-forwards the Particle System by simulating particles over 'time' seconds, then pauses it.
SetTriggerParticles
void SetTriggerParticles (int type, SParticle[] sp)
Write modified particles back to the Particle System, during a call to OnParticleTrigger. type - Type of trigger to return particles for. sp -- Particle array
type
int
Type of trigger to return particles for. 1 = Inside 2 = Outside 3 = Enter 4 = Exit
GetTriggerParticles
SParticle[] GetTriggerParticles (int type)
Get the particles that met the condition in the particle trigger module. his method is typically called from MonoBehaviour.OnParticleTrigger in response to a trigger callback.
type
int
Type of trigger to return particles for. 1 = Inside 2 = Outside 3 = Enter 4 = Exit
Properties
StartDelay
float StartDelay get
set
Start delay in seconds. Use this to delay when playback starts on the system.
IsPlaying
bool IsPlaying get
Determines whether the Particle System is playing.
IsEmitting
bool IsEmitting get
Determines whether the Particle System is emitting particles. A Particle System may stop emitting when its emission module has finished, it has been paused or if the system has been stopped.
IsStopped
bool IsStopped get
Determines whether the Particle System is stopped.
IsPaused
bool IsPaused get
Determines whether the Particle System is paused.
Loop
bool Loop get
set
Specifies whether the Particle System is looping. If you disable looping on a playing Particle System, it stops at the end of the current loop.
PlayOnAwake
bool PlayOnAwake get
set
If set to true, the Particle System will automatically start playing on startup. Note that this setting is shared between all Particle Systems in the current particle effect.
Time
float Time get
set
Playback position in seconds. Use this to read current playback time or to seek to a new playback time.
Duration
float Duration get
The duration of the Particle System in seconds.
PlaybackSpeed
float PlaybackSpeed get
set
The playback speed of the Particle System. 1 is normal playback speed.
ParticleCount
int ParticleCount get
The current number of particles.
EnableEmission
bool EnableEmission get
set
When set to false, the Particle System will not emit particles.
EmissionRate
float EmissionRate get
set
The rate of particle emission.
EmissionRateOverTime
float EmissionRateOverTime get
set
The rate at which the emitter spawns new particles over time.
EmissionRateOverDistance
float EmissionRateOverDistance get
set
The rate at which the emitter spawns new particles over distance. The emitter only spawns new particles when it moves.
StartSpeed
float StartSpeed get
set
The initial speed of particles when the Particle System first spawns them.
StartSize
float StartSize get
set
The initial size of particles when the Particle System first spawns them.
StartColor
SColor StartColor get
set
The initial color of particles when the Particle System first spawns them.
StartRotation
float StartRotation get
set
The initial rotation of particles when emitted. When using curves, this value acts as a scale on the curve. Note that the value should be given in radians.
StartRotation3D
SVector StartRotation3D get
set
The initial 3D rotation of particles when emitted. When using curves, this value acts as a scale on the curves. Note that the values are Euler angles and should be given in radians.
StartLifetime
float StartLifetime get
set
The total lifetime in seconds that particles will have when emitted. When using curves, this value acts as a scale on the curve. This value is set in the particle when it is created by the Particle System.
GravityModifier
float GravityModifier get
set
A scale that this Particle System applies to gravity.
MaxParticles
int MaxParticles get
set
The maximum number of particles to emit.
RandomSeed
uint RandomSeed get
set
Override the random seed used for the Particle System emission.
UseAutoRandomSeed
bool UseAutoRandomSeed get
set
Controls whether the Particle System uses an automatically-generated random number to seed the random number generator. If set to true, the Particle System will generate a new random seed each time it is played. If set to false, ParticleSystem.randomSeed will be used instead, allowing for a constant seed (useful if you want your particles to play in exactly the same way each time) or user-defined random value (for example, you may want to cycle through an array of seeds).
GameObject
SGameObject GameObject get
Property Description
Last updated