// Start is called before the first frame update void Start() { collectables = GameObject.Find("collectables"); colCache = collectables.GetComponent <CollectableCache>(); inventoryCanvas = transform.Find("inventory_canvas").gameObject; inventoryObject = inventoryCanvas.transform.Find("inventory").gameObject; itemPrefab = Resources.Load("ui_prefab\\item") as GameObject; stackBoxPrefab = Resources.Load("ui_prefab\\item_stack_box") as GameObject; }
// Start is called before the first frame update void Start() { item = GetComponent <Item>(); colCache = GetComponentInParent <CollectableCache>(); }