// Start is called before the first frame update void Start() { if (displayImg == null) { displayImg = this.transform.GetChild(0).gameObject.GetComponent <RawImage>(); } if (bagAndInfoController == null) { bagAndInfoController = GameObject.Find("BagAndInfoPanel").GetComponent <BagAndInfoController>(); } isOnEquip = true; displayImg.texture = onEquip; }
// Start is called before the first frame update void Start() { int limInd = gameObject.name.IndexOf("("); string numb = gameObject.name.Remove(0, limInd + 1); numb = numb.Remove(numb.Length - 1, 1); slotNo = Int32.Parse(numb); if (slotBackground == null) { slotBackground = this.gameObject.GetComponent <RawImage>(); } if (slotImage == null) { slotImage = this.transform.GetChild(0).gameObject.GetComponent <RawImage>(); } if (bagAndInfoController == null) { bagAndInfoController = GameObject.Find("BagAndInfoPanel").GetComponent <BagAndInfoController>(); } UnloadDisplay(); }