Responsive instantiated UI

Hello guys,

Theres something I’ve been struggling with for a while now, there are elements that I want to show at the borders of the screen if they are beyond the screen view.
To picture, I have enemies, and if they are not in the camera view, I have a element pointing in their direction and it cannot go further the screen.

This works for my ScreenResolution reference but it does not work for all other resolution. Basically, I need to have the correct max anchored position for x and y for the current resolution.

Anyone knows ?

Nobody ?

Post your working code here, it gives a better understanding of what is happening there.