# OnGUI()

> Unity calls this method when it populates "Preferences/External Tools" in order to allow the code editor to generate necessary GUI. For example, when creating an an argument field for modifying the arguments sent to the code editor.

## Definition

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

```csharp
void OnGUI()
```
