MaterialEditor.SetShader

function SetShader (shader : Shader) : void

function SetShader (shader : Shader, registerUndo : boolean) : void

Parameters

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

Description

Set the shader of the material.

Automatically handles internal inspector rebuilding.