Unity - Scripting API: ParticleSystemRenderer

class in UnityEngine

/

Inherits from:Renderer

/

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

Description

Use this class to render particles on to the screen.

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.

Public 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.

Inherited Members

Public Methods

MethodDescription
BroadcastMessageCalls the method named methodName on every MonoBehaviour in this game object or any of its children.
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentGets a reference to a component of type T on the same GameObject as the component specified.
GetComponentInChildrenGets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject.
GetComponentIndexGets the index of the component on its parent GameObject.
GetComponentInParentGets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.
GetComponentsGets references to all components of type T on the same GameObject as the component specified.
GetComponentsInChildrenGets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject.
GetComponentsInParentGets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject.
SendMessageCalls the method named methodName on every MonoBehaviour in this game object.
SendMessageUpwardsCalls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.
GetClosestReflectionProbesReturns an array of closest reflection probes with weights, weight shows how much influence the probe has on the renderer, this value is also used when blending between reflection probes occur.
GetMaterialsReturns all the instantiated materials of this object.
GetPropertyBlockGet per-Renderer or per-Material property block.
GetSharedMaterialsReturns all the shared materials of this object.
HasPropertyBlockReturns true if the Renderer has a material property block attached via SetPropertyBlock.
ResetBoundsReset custom world space bounds.
ResetLocalBoundsReset custom local space bounds.
SetMaterialsAssigns the shared materials of this renderer using the list of materials provided.
SetPropertyBlockLets you set or clear per-renderer or per-material parameter overrides.
SetSharedMaterialsAssigns the shared materials of this renderer using the list of materials provided.

Static Methods

MethodDescription
DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
InstantiateAsyncCaptures a snapshot of the original object (that must be related to some GameObject) and returns the AsyncInstantiateOperation.

Operators

OperatorDescription
boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

Messages

MessageDescription
OnBecameInvisible OnBecameInvisible is called when the object is no longer visible by any camera.
OnBecameVisible OnBecameVisible is called when the object became visible by any camera.