Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ParticleSystemRenderer

Use this class to render particles on to the screen.
Read time 10 minutesLast updated 2 days ago

Definition

  • Type: Class
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ParticleSystemModule
  • Inherits from: Renderer
[RequireComponent(typeof(Transform))]public sealed class ParticleSystemRenderer : Renderer

Properties

Property

Description

activeTrailVertexStreamsCountThe number of currently active custom trail vertex streams.
activeVertexStreamsCountThe number of currently active custom vertex streams.
alignmentControl the direction that particles face.
allowRollAllow billboard particles to roll around their z-axis.
cameraVelocityScaleHow much do the particles stretch depending on the Camera's speed.
enableGPUInstancingEnables GPU Instancing on platforms that support it.
flipFlip a percentage of the particles, along each axis.
freeformStretchingEnables freeform stretching behavior.
lengthScaleHow much are the particles stretched in their direction of motion, defined as the length of the particle compared to its width.
maskInteractionSpecifies how the Particle System Renderer interacts with SpriteMask.
maxParticleSizeClamp the maximum particle size.
meshThe Mesh that the particle uses instead of a billboarded Texture.
meshCountThe number of Meshes the system uses for particle rendering.
meshDistributionSpecifies how the system randomly assigns meshes to particles.
minParticleSizeClamp the minimum particle size.
normalDirectionSpecifies how to calculate lighting for the billboard.
pivotModify the pivot point used for rotating particles.
renderModeSpecifies how the system draws particles.
rotateWithStretchDirectionRotate the particles based on the direction they are stretched in. This is added on top of other particle rotation.
shadowBiasApply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the particle size.
sortingFudgeBiases Particle System sorting amongst other transparencies.
sortModeSpecifies how to sort particles within a system.
supportsMeshInstancingDetermines whether the Particle System can be rendered using GPU Instancing.
trailMaterialSet the Material that the TrailModule uses to attach trails to particles.
velocityScaleSpecifies how much particles stretch depending on their velocity.

Methods

Method

Description

BakeMeshCreates a snapshot of ParticleSystemRenderer and stores it in a mesh.
BakeTextureCreates a snapshot of ParticleSystemRenderer and stores it in a Texture2D.
BakeTrailsMeshCreates a snapshot of ParticleSystem Trails and stores them in a mesh.
BakeTrailsTextureCreates a snapshot of ParticleSystem Trails and stores them in a Texture2D.
GetActiveTrailVertexStreamsQueries which trail Vertex Shader streams are enabled on the ParticleSystemRenderer.
GetActiveVertexStreamsQueries which Vertex Shader streams are enabled on the ParticleSystemRenderer.
GetMeshesGets the array of Meshes to use when selecting particle meshes.
GetMeshWeightingsGets the array of Mesh weightings to use when randomly selecting particle meshes.
SetActiveTrailVertexStreamsEnables a set of Vertex Shader streams on the ParticleSystemRenderer for particle trails.
SetActiveVertexStreamsEnables a set of Vertex Shader streams on the ParticleSystemRenderer.
SetMeshesSets the Meshes that the ParticleSystemRenderer uses to display particles when the ParticleSystemRenderer.renderMode is set to ParticleSystemRenderMode.Mesh.
SetMeshWeightingsSets the weights that the ParticleSystemRenderer uses to assign Meshes to particles.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.