The HasFunction
method is a static member of the Editor.ShaderGraph.ShaderTemplate
class. It checks whether a shader function with the specified name exists within the shader template.
The HasFunction
method is a static member of the Editor.ShaderGraph.ShaderTemplate
class. It checks whether a shader function with the specified name exists within the shader template.
To use the HasFunction
method, call it with the name of the function you want to check for. The method returns a boolean value indicating whether the function exists.
// Example usage of HasFunction method bool functionExists = ShaderTemplate.HasFunction("ColorBurn_blend"); if (functionExists) { // The function exists, proceed with logic } else { // The function does not exist, handle accordingly }