Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

how do i fix this its not knownig UpdateUI

$
0
0
public class InventoryUI : MonoBehaviour { public Transform itemsParent; Inventory inventory; // Our current inventory InventorySlot[] slots; void Start() { inventory = Inventory.instance; inventory.OnItemChangedCallback += UpdateUI; slots = GetComponentsInChildren(); } void Update() { { // Loop through all the slots for (int i = 0; i < slots.Length; i++) { if (i < inventory.items.Count) // If there is an item to add { slots[i].AddItem(inventory.items[i]); // Add it } else { // Otherwise clear the slot slots[i].ClearSlot(); } } } void UpdateUI () { Debug.Log("UPDATING UI"); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>