ui follow player code example
Example: how to make an ui to follow gameobject
public Transform target;
void Update ()
{
Vector3 wantedPos = Camera.main.WorldToScreenPoint(target.position);
transform.position = wantedPos;
}
public Transform target;
void Update ()
{
Vector3 wantedPos = Camera.main.WorldToScreenPoint(target.position);
transform.position = wantedPos;
}