Yo!
Is there a way to get the current container reference from within a script attached to a Container menu?
I need to change the responses to the user clicking on container items depending on the type of container the items are in. I have a script on the Container menu, but I can't seem to find an obvious reference to the current container.
Any ideas?
Olly
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
If the Menu just shows whichever Container is currently "active", then you can read this independently of the Menu with:
If you're mapping the InventoryBox to a specific Container, however, you can read the InventoryBox element's OverrideContainer property:
Where
itemSlotis a GameObject reference to any Button linked to the InventoryBox element in the Menu Manager.