how do i fix this its not knownig UpdateUI

public class InventoryUI : MonoBehaviour
{

public Transform itemsParent;

Inventory inventory;    // Our current inventory

InventorySlot[] slots;

void Start()
{
    inventory = Inventory.instance;
    inventory.OnItemChangedCallback += UpdateUI;
    slots = GetComponentsInChildren<InventorySlot>();
}

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_.AddItem(inventory.items*);   // Add it*_

}
else
{
// Otherwise clear the slot
slots*.ClearSlot();*
}
}
}
void UpdateUI () {
Debug.Log(“UPDATING UI”);
}
}
}

I have the same problem, and I don’t know how to resolve it, did you by some chances figure it out?

The UpdateUI method is inside the Update method. This makes it local so its only possible to call it from Update and you still need to call it if you want it to execute.