# OnInteractivePreviewGUI(Rect, GUIStyle)

> Implement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector.

## Definition

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

```csharp
public virtual void OnInteractivePreviewGUI(Rect r, GUIStyle background)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): Rectangle in which to draw the preview.**** (\[GUIStyle]\(/engine/6000.0/script-reference/unityengine/guistyle)): Background image.

### Remarks

Implement this instead of [ObjectPreview.OnPreviewGUI](/engine/6000.0/script-reference/unityeditor/objectpreview/onpreviewgui.md) if you only want to display interactive custom previews (you can implement both if some previews are interactive and others aren't). The overidden method should use the rectangle passed in and render a preview of the asset into it. The default implementation is a no-op.
