string ShaderName { get; set; }

robot_2Generated
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 ensure that a specific shader is 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 Sandbox
// Use a UI element or logging system to display the shader name
Log.Info($"Shader Name: {shaderName}");