Description
The Attributes
property provides access to all of 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 of its appearance and behavior in the rendering pipeline.
Usage
To access the Attributes
property of a Material
object, you can simply use the property directly on an instance of Material
. This will return a RenderAttributes
object, which you can then use to query or modify the material's attributes.
Example
// Example of accessing the Attributes property of a Material
Material myMaterial = Material.Load("path/to/material");
RenderAttributes attributes = myMaterial.Attributes;
// Example of modifying an attribute
attributes.Set("SomeAttribute", 1.0f);