I am trying to find the angle to a target. However, all the solutions I am finding in the Unity community are to find the angle for rotating towards a target.
I.e.

A 2d arrow is what I am after, as exampled in the GUI2d arrow above. I want my angle to be a true angle of the target position in relation to the player. I.e. if the target is above the player then the angle would be 0, to the right then 90, below then 180 or the left then 270 of where the player is facing. Rotation should not matter, only position.

exact same problem as this question about the angle of a mouse cursor. In that case the math I gave used the standard mathematical angles, 0 being right and increasing counter-clockwise, but it can be switched to up as 0 and increasing clockwise by just swapping x and y when you call Atan2.