MaterialEditor.SetShader
SetShader(shader: Shader): void;
void SetShader(Shader shader);
def SetShader(shader as Shader) as void
SetShader(shader: Shader, registerUndo: bool): void;
void SetShader(Shader shader, bool registerUndo);
def SetShader(shader as Shader, registerUndo as bool) as void
Parameters

shader Shader to set.
registerUndo Should undo be registered.
Description

Set the shader of the material.

Automatically handles internal inspector rebuilding.