Help with grid panel

I’m working on an inventory for my game where items can have different sizes, but i’m running into this issue where if an item in the inventory has a different size all the other slots in the grid panel resize, or atleast the slots in the same row/column as the item.

No item in the inventory

Item in the inventory

For reference i’m checking the slots the item will take up and if they’re empty im removing them, so how can i stop the other grid slots from changing size and have them instead reposition to give the illusion of a spatial inventory?

You need to set the Row Spawn and Colums Span parameters according to the size of the item.
In your example - you need to set Colums Span = 2, and Row Span = 3

1 Like

It wont change the span

Inventory Slot Widget:

Is “Self” definitely a Grid Panel slot? Or is it nested somewhere else.
Span works for me:

1 Like

I got it working, i wasn’t being called on construct and i had to call it with a delay.

Thanks :wink:

Was the call originally for Event Construct in the item widget?
It would be more correct to create a Custom Event (or function) for setting Spans, which you will call yourself after creating the widget, and after adding it to the Grid Panel.