public void TransferToQuickSlot(int position) { if (position >= 0) { ClearQuickSlotInfo(); GameObject qSlot = UI.root.QuickSlotGrid.transform.GetChild(position).gameObject; QSReference = qSlot; QuickSlotManager qSlotManager = qSlot.GetComponent <QuickSlotManager>(); RawImage img = qSlot.transform.GetChild(0).gameObject.GetComponent <RawImage>(); img.texture = Reference.GetComponent <ItemPickable>().ItemIcon; img.color = Color.white; qSlotManager.Reference = this; qSlotManager.UpdateSlotInfo(); } }
private void Awake() { quickSlotManager = GetComponentInParent <QuickSlotManager>(); }