So I am making Inventory System for my game. I try add the runtime buttons to List<tk2dUIItem>, but It won't register events! Rest of code works well but I just can't add new buttons to the List
Here is what is in void OnEnable / void OnDisable:
void OnEnable()
{
foreach(tk2dUIItem _item in _itemSlotBtns)
{
if (_item != null) { _item.OnReleaseUIItem += DragItemInPlayerInventory; }
}
}
void OnDisable()
{
foreach (tk2dUIItem _item in _itemSlotBtns)
{
if (_item != null) { _item.OnReleaseUIItem -= DragItemInPlayerInventory; }
}
}