public void OnDrag(UnityEngine.EventSystems.PointerEventData eventData) { if (m_Canvas != null) { this.transform.localPosition = JerryUtil.PosScreen2Canvas(m_Canvas, JerryUtil.GetClickPos(), this.transform); } }
private void DoAdjustPos() { if (MapUtil.m_SelectFurn == null) { return; } Vector3 wordPos = MapUtil.m_SelectFurn.transform.position; Vector3 screenPos = Camera.main.WorldToScreenPoint(wordPos); screenPos.z = 0; this.transform.localPosition = JerryUtil.PosScreen2Canvas(m_Canvas, screenPos, this.transform); }
public void Set2Pos(Vector3 pos) { this.transform.localPosition = JerryUtil.PosScreen2Canvas(m_Canvas, pos, this.transform); m_Img.enabled = true; Debug.LogWarning("Flag=========================="); }