Hi, I have a custom process for saving and restoring the game state. I can't work out how to create an inventory item and place it in the shape grid at a specific position. Could you please provide a code example?
This is the code I use to get the item's position:
This is the code I use to get the item's position:
C#:
var shapeGridController = itemCollection.Inventory.gameObject.GetComponent<ItemShapeGridController>();
var gridData = shapeGridController.GetGridDataForItem(itemInfo);
var pos = gridData.GetItemIndex(itemInfo);