Version: 2018.2
public void SetShader (Shader shader);
public void SetShader (Shader newShader, bool registerUndo);

Parameters

shaderShader to set.
registerUndoShould undo be registered.

Description

Set the shader of the material.

Automatically handles internal inspector rebuilding.