ParticleSystem2D Component Reference

The ParticleSystem2D component is used to read the particle asset data and perform a series of operations such as play, pause, destroy, etc. Particle assets support plist files and images, both of which are recommended to be placed in the same folder.

ParticleSystem2D

Click the Add Component button at the bottom of the Inspector panel and select ParticleSystem2D from Effects to add the ParticleSystem2D component to the node.

For the script interface of ParticleSystem2D, please refer to ParticleSystem API.

ParticleSystem2D Properties

PropertyDescription
CustomMaterialCustom material, please refer to the Custom Material documentation.
ColorColor of particles.
PreviewPreviews particles in editor mode. When enabled, particles will be played automatically in the Scene panel when they are selected.
PlayOnLoadIf this option is checked, the particles will be emitted automatically at runtime.
AutoRemoveOnFinishAutomatically destroys the node where the particle is located when it finishes playing.
FileThe particle configuration file in Plist format.
CustomWhether to allow custom particle properties. When this property is enabled, the particle properties of the following sections can be customized.
SpriteFrameCustomizes the texture of particles.
DurationThe duration of the particle system in seconds, -1 means continuous emission.
EmissionRateThe number of particles emitted per second.
LifeThe running time and range of particles.
TotalParticleThe maximum number of particles.
StartColorThe initial color of particles.
EndColorThe end color of particles.
AngleThe angle and range of particles.
StartSizeThe initial size and range of particles.
EndSizeThe end size and range of particles.
StartSpinThe initial spin angle and range of particles.
EndSpinThe end spin angle and size of particles.
PosVarThe range of the emitter position (horizontal and vertical).
PositionTypeThe type of particle position, including FREE, RELATIVE, GROUPED. For details, please refer to PositionType API.
EmitterModeThe type of the emitter, including GRAVITY, RADIUS. For details, please refer to EmitterMode API.
GravityGravity. Only works when Emitter Mode is set to GRAVITY.
SpeedThe speed and range. Only effective when Emitter Mode is set to GRAVITY.
TangentialAccelThe tangential acceleration and range of each particle i.e. the acceleration perpendicular to the direction of gravity. Effective only when Emitter Mode is set to GRAVITY.
RadialAccelThe radial acceleration and range of particles, i.e. the acceleration parallel to the gravity direction. Effective only when Emitter Mode is set to GRAVITY.
RotationIsDirWhether the rotation of each particle is equal to its direction. Effective only when Emitter Mode is set to GRAVITY.
StartRadiusThe initial radius and range, which indicates the distance of particles relative to the emitter when it is launched. Effective only when Emitter Mode is set to RADIUS.
EndRadiusThe end radius and range. Valid only when Emitter Mode is set to RADIUS.
RotatePerSThe rotation angle and range of particles around the initial point per second. Only effective when Emitter Mode is set to RADIUS.

For more specific usage, please refer to the official ui/25.particle example.