Version: 2019.1 (switch to 2018.3 or 2017.4)
LanguageEnglish
  • C#

Particle

struct in UnityEngine

/

Implemented in:UnityEngine.ParticleSystemModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

Script interface for a Particle.

Properties

angularVelocityThe angular velocity of the particle.
angularVelocity3DThe 3D angular velocity of the particle.
animatedVelocityThe animated velocity of the particle.
axisOfRotationMesh particles will rotate around this axis.
positionThe position of the particle.
randomSeedThe random seed of the particle.
remainingLifetimeThe remaining lifetime of the particle.
rotationThe rotation of the particle.
rotation3DThe 3D rotation of the particle.
startColorThe initial color of the particle. The current color of the particle is calculated procedurally based on this value and the active color modules.
startLifetimeThe starting lifetime of the particle.
startSizeThe initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.
startSize3DThe initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.
totalVelocityThe total velocity of the particle.
velocityThe velocity of the particle.

Public Methods

GetCurrentColorCalculate the current color of the particle by applying the relevant curves to its startColor property.
GetCurrentSizeCalculate the current size of the particle by applying the relevant curves to its startSize property.
GetCurrentSize3DCalculate the current 3D size of the particle by applying the relevant curves to its startSize3D property.
GetMeshIndexCalculate the mesh index of the particle, used for choosing which mesh a particle is rendered with.
SetMeshIndexSet the mesh index of the particle, used for choosing which mesh a particle is rendered with.

Did you find this page useful? Please give it a rating: