using System.Collections; using System.Collections.Generic; using UnityEngine; public class Area : MonoBehaviour { public Transform target; void Start() { } // Update is called once per frame void Update() { if (target != null) { this.GetComponent().position = Camera.main.WorldToScreenPoint(target.position); } } }