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.
Why 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 fix errors like this
There is no automatic fix for this. You should see which shaders are affected and try to fix them yourself or find a working version of them.