bool Batchable { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Batchable property of a SceneObject indicates whether the object can be batched by material for rendering purposes. If set to false, it means the object has dynamic attributes that affect rendering, preventing it from being batched with other objects sharing the same material.

Usage

Use the Batchable property to determine if a SceneObject can be grouped with other objects for rendering optimization. This is particularly useful when dealing with objects that have dynamic properties or require individual rendering passes.

Example

// Example of checking if a SceneObject is batchable
SceneObject mySceneObject = new SceneObject();

if (mySceneObject.Batchable)
{
    // The object can be batched with others for rendering
    // Perform operations that benefit from batching
}
else
{
    // The object cannot be batched due to dynamic attributes
    // Handle rendering individually
}