Extend ShaderUtil API (GetShaderInfo)

ShaderUtil contains the ShaderUtil.GetAllShaderInfo() method.

I would like to be able to get the ShaderInfo for a specific shader only, method signature like:

ShaderInfo ShaderUtil.GetShaderInfo(Shader shader)

Additionally, I would find it very useful if you could also add “hasWarnings” property to the ShaderInfo struct. At the moment, it contains “hasErrors”, but not “hasWarnings”.

I know it’s been two years, but here goes: Unity Issue Tracker - No API to determine if a shader has warnings

1 Like