Description
The UpdateScene
method is responsible for updating the scene in the context of a legacy particle preview. This method is typically used to advance the simulation of particles within the preview environment, allowing for real-time updates and visual feedback.
Usage
To use the UpdateScene
method, you need to provide two parameters:
cycle
(of type System.Single
): Represents the current cycle or iteration of the update process. This parameter is used to control the progression of the particle simulation.
timeStep
(of type System.Single
): Specifies the time step for the update. This parameter determines how much time has passed since the last update, affecting the speed and behavior of the particle simulation.
Invoke this method within the context of a particle preview to ensure that the scene reflects the latest state of the particle system.
Example
// Example of using UpdateScene method
PreviewLegacyParticle particlePreview = new PreviewLegacyParticle();
// Update the scene with a specific cycle and time step
float cycle = 1.0f;
float timeStep = 0.016f; // Typically, 1/60th of a second for 60 FPS
particlePreview.UpdateScene(cycle, timeStep);