How the Check Works
The CheckBrokenShaders
is designed to identify shaders in your project that have compilation errors. This check operates at the Shader level, inspecting individual shaders for any compilation issues.
The check performs the following steps:
- Shader Inspection: It examines each provided shader for compilation errors using Unity’s
ShaderUtil.ShaderHasError
method. - Issue Reporting: If a shader is found to have compilation errors, it logs an issue indicating the shader’s name and the fact that it has compilation errors.
When to Use This Check
- Shader Compilation Verification: To ensure that shaders in your project are free of compilation errors, which can lead to rendering issues or unexpected behavior.
How to Use the Check
- Configuration: No specific configuration is needed for this check.
- Perform Checks on Shaders: Invoke the
PerformCheck(Shader s)
method and pass in the shader you want to examine. The check will analyze the shader for compilation errors and log any issues found.
Methods
PerformCheck(Shader s)
: Initiates the verification process for a specific shader. It checks if the shader has any compilation errors and logs them if present.
Attributes
longDescription
: Provides a description of what this check does, explaining its purpose in identifying shaders with compilation errors in your project.