So i’m working on making a hotbar style inventory using a uniform grid. after posting on the forums it was suggested that i dynamically expand the inventory as needed. I have expanding working as intended, i just can’t seem to find/figure out how to remove boxes when I don’t need them.
currently, if my array of inventory items goes above 10, it adds a new inventory slot and fills it with the item. I have 10 set up in an array at the start of the game, the code in the image i posted just adds slots. What i would like to happen is when i remove an item from the inventory (done elsewhere in code) i’d like the empty slot on the end to disappear. The ‘add child’ coming off the false of the branch doesn’t seem to set the number of columns like i thought it does. there doesn’t seem to be a ‘remove’ counterpart to the add nodes. If the ‘Remove from parent’ node is my answer I can’t quite wrap my head around how to do it.
Has anyone done this before?