float Scale { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Scale property of the ParticleSpriteRenderer class determines the size of the particle sprites being rendered. It is a floating-point value that can be adjusted to scale the particles up or down.

Usage

To use the Scale property, simply set it to a desired value within the specified range. The property is decorated with a RangeAttribute that limits its value between 0 and 2, with a step of 0.01. This ensures that the scale is always within a reasonable range for rendering purposes.

Example

// Example of setting the Scale property
ParticleSpriteRenderer particleRenderer = new ParticleSpriteRenderer();
particleRenderer.Scale = 1.5f; // Sets the scale of the particle sprites to 1.5