public void Update() { // Clear and update this.interactablesItem.Clear(); this.interactablesBarrel = InstanceTracker.GetInstancesList <BarrelInteraction>(); // Process multishops MultiShopController[] multishops = GameObject.FindObjectsOfType <MultiShopController>(); foreach (MultiShopController multishop in multishops) { GameObject[] terminalGameObjects = multishop.GetFieldValue <GameObject[]>("terminalGameObjects"); if (terminalGameObjects != null) { foreach (GameObject terminal in terminalGameObjects) { ShopTerminalBehavior shop = terminal.GetComponent <ShopTerminalBehavior>(); PickupIndex pickup = shop.GetFieldValue <PickupIndex>("pickupIndex"); // TODO: Check if pickup is higher priority // FILLER this.interactablesItem.Add(new BotInteractable <PurchaseInteraction>(terminal.gameObject)); } } } // Process chests ChestBehavior[] chests = GameObject.FindObjectsOfType <ChestBehavior>(); foreach (ChestBehavior chest in chests) { interactablesItem.Add(new BotInteractable <PurchaseInteraction>(chest.gameObject)); } }