I have a script that manages all enemies that are in the world basically i need some function that be able to increase or decrease font size when the player is near or farest from they.
here is what im trying to make:
float distance = Vector3.Distance(camera.transform.position, enemy.transform.position);
_text.fontSize = // Do something with distance so the size can increase if near or decrease if farest, basically inversely proportional