void Start() { // Create a position finder to follow the target's position on screen. positionFinder = new OnScreenPositionFinder(GetComponentInParent <Canvas>().GetComponent <RectTransform>(), playerCamera); }
void Start() { // Create a new screenPosFinder from our parent canvas. screenPosFinder = new OnScreenPositionFinder(GetComponentInParent <Canvas>().GetComponent <RectTransform>(), playerCamera); }