Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Particle

struct in UnityEngine

Switch to Manual

Description

Script interface for a Particle.

Variables

angularVelocityThe angular velocity of the particle.
angularVelocity3DThe 3D angular velocity of the particle.
lifetimeThe lifetime of the particle.
positionThe position of the particle.
randomSeedThe random seed 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.
velocityThe velocity of the particle.

Public Functions

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.