using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UiFollowObj : MonoBehaviour {
Transform m_trans;
public Transform m_followTrans;
public GameObject m_child;
// Use this for initialization
void Start () {
m_trans = this.transform;
}
private void LateUpdate()
{
if (m_followTrans != null)
{
Vector2 player2DPosition = Camera.main.WorldToScreenPoint(m_followTrans.position);
m_trans.position = player2DPosition;
}
}
}