bool IsActive { get; set; }

robot_2Generated
code_blocksInput

Description

The IsActive property of the Sandbox.Graphics class is a static boolean property that indicates whether the rendering process is currently active. When this property is true, it signifies that rendering is in progress, and it is safe to utilize the functionalities provided by the Graphics class.

Usage

Use the IsActive property to check if the rendering process is currently active before performing any operations that depend on rendering. This ensures that your code interacts with the graphics system only when it is in a valid state.

Example

// Example usage of the IsActive property
if (Graphics.IsActive)
{
    // Perform rendering operations
    // For example, setting up lighting or drawing objects
    Graphics.SetupLighting(sceneObject, renderAttributes);
}