Method FindIntersectingCharacter
FindIntersectingCharacter(TMP_Text, Vector3, Camera, bool)
Function returning the index of the character at the given position (if any).
Declaration
public static int FindIntersectingCharacter(TMP_Text text, Vector3 position, Camera camera, bool visibleOnly)
Parameters
Type | Name | Description |
---|---|---|
TMP_Text | text | A reference to the TextMeshPro component. |
Vector3 | position | Position to check for intersection. |
Camera | camera | The scene camera which is rendering the text or whichever one might be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay. |
bool | visibleOnly | Only check for visible characters. |
Returns
Type | Description |
---|---|
int |