How to create an item shape slot grid collection?

Lets assume an example with the default item slot grid collection, with this we define different item view slots in the ui, and we link them to our collection and based on each defined category in the ItemSlotSet we check if an item can be dragged or placed in either of these spots.

Mask => Top
Hand => Bottom Left

1642779057657.png

1642778960149.png

How should one approach a transition to something using the same ItemSlotSet to limit items for an item shape slot collection instead?


so each item view slot would instead be smaller item shape grids linking to the same collection like this:
1642779923143.png
 
Last edited:
I'm afraid that's not really possible. The main reason is that the ItemSlotSet defines one slot in the ItemSlotCollection. So even if you setup an ItemShapeGridData that monitors that single Slot, it won't allow you to set more than one item in that item shape grid.

if that's what you want then you could give this a try. Add an ItemShapeGridData for each slot, Make sure it monitors the ItemSlotCollection and that it has a custom filter/restriction to only monitor one of the slots in ItemSotCollection.

That being said I would rather make a custom solution. Instead of an ItemSlotCollection, you can create your own custom collection which can allow multiple items per slot in the ItemSlotSet, and then you may hook up multiple ItemShapeGridData just like defined before. To limit manual errors you could create a Custom ItemShapeGridController that creates the ItemShapeGridData and set them up with the custom restrictions in code

I hope that gives you some ideas on how this could be achieved.
 
Top