void Awake() { if (instance != null) { Debug.Log("More than one chest inventory manager instance found!"); } instance = this; }
// Use this for initialization void Start() { inventoryUI = InventoryUI.instance; chestInventoryManager = ChestInventoryManager.instance; chestInventoryManager.onChestItemChangedCallback += UpdateUI; slots = itemsParent.GetComponentsInChildren <InventorySlot>(); DefineSlotIndexes(); }