# OnGUI(MaterialEditor, MaterialProperty[])

> To define a custom shader GUI use the methods of materialEditor to render controls for the properties array.

## Definition

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

```csharp
public virtual void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
```

### Parameters

**** (\[MaterialEditor]\(/engine/6000.5/script-reference/unityeditor/materialeditor)): The MaterialEditor that are calling this OnGUI (the 'owner').**** (\[MaterialProperty\[]]\(/engine/6000.5/script-reference/unityeditor/materialproperty)): Material properties of the current selected shader.
