RenderAttributes Attributes { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Attributes property provides access to all the render attributes associated with a Material in the Sandbox environment. These attributes define various rendering properties and settings that can be applied to the material, allowing for detailed customization and control over its appearance and behavior in the rendering pipeline.

Usage

To access the render attributes of a material, you can use the Attributes property. This property returns a RenderAttributes object, which you can use to query or modify the material's attributes.

Example usage:

Material myMaterial = Material.Load("path/to/material");
RenderAttributes attributes = myMaterial.Attributes;

// Example: Modify an attribute
attributes.Set("SomeAttribute", newValue);

// Example: Retrieve an attribute
var attributeValue = attributes.Get("SomeAttribute");

Example

Material myMaterial = Material.Load("path/to/material");
RenderAttributes attributes = myMaterial.Attributes;

// Example: Modify an attribute
attributes.Set("SomeAttribute", newValue);

// Example: Retrieve an attribute
var attributeValue = attributes.Get("SomeAttribute");