int MaximumParticles { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The MaximumParticles property specifies the total number of particles that can be emitted by the SceneParticles object. This property is crucial for managing performance and ensuring that the particle system does not exceed the desired particle count, which could lead to performance issues.

Usage

Use the MaximumParticles property to set or get the maximum number of particles that the SceneParticles system can handle. This property is particularly useful when you need to control the density and performance of your particle effects.

Example

// Create a new SceneParticles object
SceneParticles particles = new SceneParticles();

// Set the maximum number of particles to 1000
particles.MaximumParticles = 1000;

// Retrieve the current maximum number of particles
int maxParticles = particles.MaximumParticles;

// Output the maximum number of particles
// Note: Avoid using Console.WriteLine in s&box
// Instead, use in-game debugging tools or UI elements to display this information
// Debug.Log($"Maximum Particles: {maxParticles}");