point to a GameObject that is out-of-screen respecting edge


Here’s what I want to code:

Basically, I want to point an arrow to a GameObject that is out of the screen (helping the player to find it). The arrow should always be around the edge of the mobile screen (android & ios). I have 2 cameras: 1 for the arrow (GUI): orthographic 2D only & 1 for the GameObject: perspective.

Any pseudo code / class & method to get me started would be much appreciated!

searching ‘edge of screen unity3d’ on Google yields results that should help get you started: