# GetCursorStringIndex(Rect, GUIContent, Vector2)

> Get the cursor position (indexing into contents.text) when the user clicked at cursorPixelPosition.

## Definition

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

```csharp
public int GetCursorStringIndex(Rect position, GUIContent content, Vector2 cursorPixelPosition)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): **** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): **** (\[Vector2]\(/engine/6000.0/script-reference/unityengine/vector2)):&#x20;

### Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### Remarks

This does not respect any images inside content.
