| Parameter | Description |
|---|---|
| shader | The shader to assign to the materials. |
Sets the shader of the materials that the editor is inspecting, and registers an undo operation.
The method also rebuilds the inspector for the new shader. To change the shader without undo support, use the overload that takes registerUndo.
| Parameter | Description |
|---|---|
| newShader | The shader to assign to the materials. |
| registerUndo | Set to true to register an undo operation for the change. Set to false to change the shader without undo support. |
Sets the shader of the materials that the editor is inspecting, with the option to register an undo operation.
The method also rebuilds the inspector for the new shader.