# OnGUI

> Override this method to make your own GUI for the property.

## Definition

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

## OnGUI(Rect, MaterialProperty, GUIContent, MaterialEditor)

Override this method to make your own GUI for the property.

```csharp
public virtual void OnGUI(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
```

### Parameters

**** (\[Rect]\(/engine/6000.3/script-reference/unityengine/rect)): Rectangle on the screen to use for the property GUI.**** (\[MaterialProperty]\(/engine/6000.3/script-reference/unityeditor/materialproperty)): The [MaterialProperty](/engine/6000.3/script-reference/unityeditor/materialproperty.md) to make the custom GUI for.**** (\[GUIContent]\(/engine/6000.3/script-reference/unityengine/guicontent)): The label of this property.**** (\[MaterialEditor]\(/engine/6000.3/script-reference/unityeditor/materialeditor)): Current material editor.

## OnGUI(Rect, MaterialProperty, string, MaterialEditor)

Override this method to make your own GUI for the property.

```csharp
public virtual void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor)
```

### Parameters

**** (\[Rect]\(/engine/6000.3/script-reference/unityengine/rect)): Rectangle on the screen to use for the property GUI.**** (\[MaterialProperty]\(/engine/6000.3/script-reference/unityeditor/materialproperty)): The [MaterialProperty](/engine/6000.3/script-reference/unityeditor/materialproperty.md) to make the custom GUI for.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The label of this property.**** (\[MaterialEditor]\(/engine/6000.3/script-reference/unityeditor/materialeditor)): Current material editor.
