Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetCursorStringIndex(Rect, GUIContent, Vector2)

Get the cursor position (indexing into contents.text) when the user clicked at cursorPixelPosition.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.IMGUIModule
public int GetCursorStringIndex(Rect position, GUIContent content, Vector2 cursorPixelPosition)

Parameters

position


content


cursorPixelPosition

Returns

Type

Description

int

Remarks

This does not respect any images inside content.