Utility functions to assist with working with shaders from the editor.
allowAsyncCompilation | When true, asynchronous Shader compilation is allowed at the current call site. |
anythingCompiling | When true, the Editor is compiling some Shaders asynchronously at the point of query. |
hardwareSupportsRectRenderTexture | Does the current hardware support render textues. |
ClearCachedData | Clears all internally-cached data that was generated for the given shader, such as errors and compilation info. |
ClearShaderErrors | Clears compile time messages for the given shader. |
ClearShaderMessages | Clear compile time messages for the given shader. |
CompilePass | Request the Editor to compile the Shader Variant needed for the specific pass of the given Material. |
GetAllShaderInfo | Returns an array of ShaderInfo of all available shaders. That includes built-in shaders. |
GetComputeShaderMessageCount | Returns the number of errors and warnings generated by the Unity Shader Compiler for the given ComputeShader. |
GetComputeShaderMessages | Returns each error and warning generated by the Unity Shader Compiler for the given ComputeShader. |
GetPropertyCount | Get the number of properties in Shader s. |
GetPropertyDescription | Get the description of the shader propery at index propertyIdx of Shader s. |
GetPropertyName | Get the name of the shader propery at index propertyIdx of Shader s. |
GetPropertyType | Get the ShaderProperyType of the shader propery at index propertyIdx of Shader s. |
GetRangeLimits | Get Limits for a range property at index propertyIdx of Shader s. |
GetShaderData | Get the shader data for a specific shader. |
GetShaderMessageCount | Returns the number of errors and warnings generated by the Unity Shader Compiler for the given Shader. |
GetShaderMessages | Returns each error and warning generated by the Unity Shader Compiler for the given Shader. |
GetTexDim | Gets texture dimension of a shader property. |
IsPassCompiled | Checks if the Shader variant for the given pass in the Material has already been compiled. |
IsShaderPropertyHidden | Is the shader propery at index propertyIdx of Shader s hidden? |
IsShaderPropertyNonModifiableTexureProperty | Is the shader propery at index propertyIdx of Shader s a NonModifiableTextureProperty? |
RegisterShader | Register a user created shader. |
RestoreAsyncCompilation | Restores the previous Shader compilation mode in this CommandBuffer scope. |
SetAsyncCompilation | Adds shader compilation mode command in the CommandBuffer. |
ShaderHasError | Returns true if the given Shader generated any errors. Ignores warnings. |
UpdateShaderAsset | Replaces the existing source code in the specified shader with the source code in the supplied string. The override provides a boolean that specifies whether the shader should be recompiled. |
Did you find this page useful? Please give it a rating: