/// <summary> /// 点击物体时 开始拖拽 /// </summary> public void OnPointerDown(PointerEventData eventData) { Debug.LogError("QBagDrag" + name); if (!QBag.IsDrag) { QBag.DragItem(this); } }
// Start is called before the first frame update void Start() { bag = GetComponentInParent <QBag>(); }