# OnMaterialPreviewGUI(MaterialEditor, Rect, GUIStyle)

> Override for extending the rendering of the Preview area or completly replace the preview (by not calling base.OnMaterialPreviewGUI).

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public virtual void OnMaterialPreviewGUI(MaterialEditor materialEditor, Rect r, GUIStyle background)
```

### Parameters

**** (\[MaterialEditor]\(/engine/6000.7/script-reference/unityeditor/materialeditor)): The MaterialEditor that are calling this method (the 'owner').**** (\[Rect]\(/engine/6000.7/script-reference/unityengine/rect)): Preview rect.**** (\[GUIStyle]\(/engine/6000.7/script-reference/unityengine/guistyle)): Style for the background.
