GetShaderMessages
Gets the errors and warnings that the shader compiler generated for a shader on all compiler platforms.
阅读时间1 分钟最后更新于 16 天前
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
GetShaderMessages(Shader)
Gets the errors and warnings that the shader compiler generated for a shader on all compiler platforms.
public static ShaderMessage[] GetShaderMessages(Shader s)
Parameters
Returns
Type | Description |
|---|---|
| ShaderMessage[] | An array of ShaderMessage structs that contains the generated messages. |
Remarks
Use this method to check whether a shader compiled without errors. The method returns the messages from every compiler platform. To get the messages for a single platform, use the overload that takes a ShaderCompilerPlatform.
GetShaderMessages(Shader, ShaderCompilerPlatform)
Gets the errors and warnings that the shader compiler generated for a shader on a specific compiler platform.
public static ShaderMessage[] GetShaderMessages(Shader s, ShaderCompilerPlatform platform)
Parameters
The ShaderCompilerPlatform to get messages for.
Returns
Type | Description |
|---|---|
| ShaderMessage[] | An array of ShaderMessage structs that contains the generated messages. |
Remarks
Use this method to check whether a shader compiles without errors for a specific graphics API. The method returns only the messages that the compiler generated for . To get the messages for all platforms, use the overload without a platform.
platform