Method FindNearestCharacter
FindNearestCharacter(TMP_Text, Vector3, Camera, bool)
Function to find the nearest character to position.
Declaration
public static int FindNearestCharacter(TMP_Text text, Vector3 position, Camera camera, bool visibleOnly)
Parameters
Type | Name | Description |
---|---|---|
TMP_Text | text | A reference to the TMP Text component. |
Vector3 | position | Position to check for intersection. |
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. |
bool | visibleOnly | Only check for visible characters. |
Returns
Type | Description |
---|---|
int |