unity get position on screen code example
Example: unity object to screen position
public Transform target;
Camera cam;
void Start()
{
cam = GetComponent<Camera>();
// gets position of object on screen
Vector2 screenPos = cam.WorldToScreenPoint(target.position);
}