Hello!
I'm using AC version 1.57. Unity version 5.5.1f1.
In my game, I want to have a menu with a lot of tabs (or buttons) and a central body containing the items (a inventoryBox with, say, capacity for 9 items).
I want that, if I press on the "Food tab", then the inventory box will show the food category, if I press the "Tools tab", then it will show tool category items, and so on. I do not know which is the best way to tackle this though.
So I tried to do this by having one Inventory menu (using unity UI) with a bunch of InventoryBox elements, all of them hidden except the default one. Then, using a button and an actionList linked to it, I would call Menu: Change State - Show/Hide menu element on said action list to switch between the multiple inventory boxes.
Right now I have my unity canvas with 2 grid elements, 9 slots each. One of these has its 9 buttons linked to the first InventoryBox (category: Food), the other has its 9 buttons linked to the second InventoryBox (category: Tools).
But it doesn't work. What should I do to manage this change? Should I change the way I'm tacking this?
Comments
Alternatively, you could try using an Animator component to show / hide (i.e. move in and out of view) the elements manually. When AC links an element to Unity UI, it won't control the position - so you can change that yourself through animation. If you then create an Animator parameter that can be used to control which tab is open, a simple Object: Animate Action could then be used to modify it.
But again, switch your Source back to Adventure Creator to confirm that this isn't an issue with AC's Menu system. That will help us narrow the problem down.
Again, this may be easier for you to just PM me the Menu Manager, Canvas prefab and related ActionList assets for me to see myself. Package them up in a .unitypackage file and I'll take a look.
Had a very similar issue...and I discovered it was because of how AC performs "Hide menu element" action on inventory boxes. If "When slot is empty" is set to "Clear content" it will still display empty menu slots even after you hide the menu element. @ChrisIceBox is this intended behaviour?
However I still wanted to keep it that way because in my setup "Disable object" changed position of menu slots depending on how full the inventory box was.
The way I solved it was by setting Empty slot texture to none and creating dummy empty slots that were always displayed when Inventory menu was enabled while setting their layer order lower than that of inventory boxes.
I would need more details. You're saying that elements are showing even after using the "Menu: Change state" Action to hide them?
Please create a new thread with screenshots showing your set up, as well as AC/Unity version numbers.