Method FindNearestWord
FindNearestWord(TMP_Text, Vector3, Camera)
Function returning the index of the word at the given position (if any).
Declaration
public static int FindNearestWord(TMP_Text text, Vector3 position, Camera camera)
Parameters
Type | Name | Description |
---|---|---|
TMP_Text | text | A reference to the TMP_Text component. |
Vector3 | position | |
Camera | camera | The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay. |
Returns
Type | Description |
---|---|
int |