public virtual void ReferenceChildren() { mainSlotManager = transform.parent.parent.GetComponent <SlotMouseInputControl> (); childIcon = transform.FindChild("Icon").GetComponent <Image> (); childIcon.enabled = false; tooltip = transform.FindChild("Tooltip"); selectionIndicator = transform.FindChild("Selection Indicator").GetComponent <RectTransform> (); stackIndicator = transform.FindChild("Stack Indicator").GetComponent <Text> (); UpdateStackIndicator(); }
public virtual void ReferenceChildren() { Debug.Log("Initialized inventory " + gameObject.name); mainSlotManager = transform.parent.parent.GetComponent <SlotMouseInputControl> (); childIcon = transform.Find("Icon").GetComponent <Image> (); childIcon.enabled = false; tooltip = transform.Find("Tooltip"); selectionIndicator = transform.Find("Selection Indicator").GetComponent <RectTransform> (); stackIndicator = transform.Find("Stack Indicator").GetComponent <Text> (); UpdateStackIndicator(); }