string ShaderName { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

Gets the underlying shader name for this material. This property provides the name of the shader that is used by the material, which can be useful for debugging or when you need to verify the shader being applied to a material.

Usage

To access the ShaderName property, you need to have an instance of the Material class. Once you have the instance, you can simply get the property value to retrieve the shader name.

Example

// Example of accessing the ShaderName property
Material myMaterial = Material.Load("path/to/material");
string shaderName = myMaterial.ShaderName;

// Output the shader name
// Note: Avoid using Console.WriteLine in s&box
// Instead, use a logging system or UI element to display the shader name
Log.Info($"Shader Name: {shaderName}");