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.
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.
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 shader name as shown below:
// Assuming 'material' is an instance of Sandbox.Material string shaderName = material.ShaderName; // Output the shader name // Note: Avoid using Console.WriteLine in s&box // Use the appropriate logging or UI method to display the shader name Log.Info($"Shader Name: {shaderName}");