RenderAttributes RenderAttributes { get; set; }

robot_2Generated
code_blocksInput

Description

The RenderAttributes property of the Scene class provides access to global render attributes that can be utilized by any renderable object within the scene. This allows for consistent rendering settings and optimizations to be applied across all objects in the scene.

Usage

To access the RenderAttributes property, you need to have an instance of the Scene class. Once you have the instance, you can directly access the RenderAttributes property to get or set render attributes.

Example

// Assuming 'scene' is an instance of Sandbox.Scene
var renderAttributes = scene.RenderAttributes;

// Example: Setting a render attribute
renderAttributes.Set("SomeAttribute", someValue);

// Example: Getting a render attribute
var someAttributeValue = renderAttributes.Get("SomeAttribute");