# GUIUtility

> Utility class for making new GUI controls.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.IMGUIModule

```csharp
public class GUIUtility
```

## Remarks

Unless you are creating your own GUI controls from scratch, you should not use these functions.

## Static Properties

| Property                                                                                       | Description                                                                            |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [hasModalWindow](/engine/6000.7/script-reference/unityengine/guiutility/hasmodalwindow.md)     | A global property, which is true if a ModalWindow is being displayed, false otherwise. |
| [hotControl](/engine/6000.7/script-reference/unityengine/guiutility/hotcontrol.md)             | The controlID of the current hot control.                                              |
| [keyboardControl](/engine/6000.7/script-reference/unityengine/guiutility/keyboardcontrol.md)   | The controlID of the control that has keyboard focus.                                  |
| [systemCopyBuffer](/engine/6000.7/script-reference/unityengine/guiutility/systemcopybuffer.md) | Get access to the system-wide clipboard.                                               |

## Static Methods

| Method                                                                                           | Description                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AlignRectToDevice](/engine/6000.7/script-reference/unityengine/guiutility/alignrecttodevice.md) | Align a local space rectangle to the pixel grid.                                                                                                                                                                                            |
| [ExitGUI](/engine/6000.7/script-reference/unityengine/guiutility/exitgui.md)                     | Puts the GUI in a state that will prevent all subsequent immediate mode GUI functions from evaluating for the remainder of the GUI loop by throwing an [ExitGUIException](/engine/6000.7/script-reference/unityengine/exitguiexception.md). |
| [GetControlID](/engine/6000.7/script-reference/unityengine/guiutility/getcontrolid.md)           | Get a unique ID for a control, using an integer as a hint to help ensure correct matching of IDs to controls.                                                                                                                               |
| [GetStateObject](/engine/6000.7/script-reference/unityengine/guiutility/getstateobject.md)       | Get a state object from a controlID.                                                                                                                                                                                                        |
| [GUIToScreenPoint](/engine/6000.7/script-reference/unityengine/guiutility/guitoscreenpoint.md)   | Convert a point from GUI position to screen space.                                                                                                                                                                                          |
| [GUIToScreenRect](/engine/6000.7/script-reference/unityengine/guiutility/guitoscreenrect.md)     | Convert a rect from GUI position to screen space.                                                                                                                                                                                           |
| [QueryStateObject](/engine/6000.7/script-reference/unityengine/guiutility/querystateobject.md)   | Get an existing state object from a controlID.                                                                                                                                                                                              |
| [RotateAroundPivot](/engine/6000.7/script-reference/unityengine/guiutility/rotatearoundpivot.md) | Helper function to rotate the GUI around a point.                                                                                                                                                                                           |
| [ScaleAroundPivot](/engine/6000.7/script-reference/unityengine/guiutility/scalearoundpivot.md)   | Helper function to scale the GUI around a point.                                                                                                                                                                                            |
| [ScreenToGUIPoint](/engine/6000.7/script-reference/unityengine/guiutility/screentoguipoint.md)   | Convert a point from screen space to GUI position.                                                                                                                                                                                          |
| [ScreenToGUIRect](/engine/6000.7/script-reference/unityengine/guiutility/screentoguirect.md)     | Convert a rect from screen space to GUI position.                                                                                                                                                                                           |
