Forum rules - please read before posting.

2 Inventory Boxes in 1 Menu

Hello peeps!

I'm trying to make an inventory with 2 categories "clues" and "items".

I have managed this by using 2 inventory boxes, each displaying 1 category, in the same menu however I can't scroll over to the second menu. (I'm not using any mouse control as I mainly want the game to be played on a gamepad).

Is there any way I can do this or another method to achieve my goal? I'd ideally like them all on one screen.

Cheers.

Comments

  • I'd also be ok with 1 inventory box with the 2 categories separated somehow. Worst case scenario I could have 2 separate screens that toggle on a button press but can still have combine actions work across both. 
  • Methods of switching between multiple InventoryBoxes were discussed in this thread.

    Controlling Menus with gamepads is a complex topic in and of itself.  What do you mean exactly by "scroll over"?  An image showing your desired layout would help understand what it is you're going for.

    You'll have more control over gamepad-controlling your Menu if the Menu itself is linked to Unity UI.  If the Menu does not pause the game, be sure to use the Engine: Manage systems Action when it turns on to allow keyboard (and gamepads, by extension) controlling of menus during gameplay.
  • Basically I want 2 Grids like this:

    Items  Clues
    xxxx    xxxx
    xxxx    xxxx

    By "scroll over" I mean that when I get to the furthest object on the right in the items box I'd like it to then move on to the clues box as if it was all in 1 grid. 

    The menu pauses the game so there's no complication there, I can control them fine it's just I can't select anything in the second grid.

    Is there no way to have 1 grid and separate the items by category somehow? That seems like it would be simpler to control.


  • No, there isn't.  For that kind of navigation, you're going to want to look into rendering your Menus with Unity UI.  If you haven't already, switch over to that (see this tutorial) and we can then see how it works and what needs tweaking.
  • I followed the tutorial but couldn't get any of my items to display in the inventory, I'm using text only with no icons so perhaps that doesn't work with text? Also I couldn't control it with the keyboard/controller at all, do I need to put some code on it? I've resigned myself to making 2 separate menus for now until a better solution presents itself.

    The default menus all have multiple elements that I can scroll through with keyboard/controller, why are inventory boxes different that they don't allow you to move on to a different element? I can't even add a selectable button, as soon as I have an inventory box grid the keyboard/controller is stuck in there and can't select another element. 

  • UI prefabs can absolutely work with text.  The default InventoryUI prefab can be modified by replacing its Image components with Text components - try it with the Demo_MenuManager.

    Inventory boxes have the added complication of having multiple slots, whereas Buttons etc only have one.  AC's menu-scrolling is quite limited, which is why Unity UI should be used as it gives you complete control over how scrolling works.

    You must be sure to check Auto-select first visible Element? and assign your Menu's First selected element, however, as scrolling will not work without it - see the help box that appears beneath that field.

    Each of the Menus in the Demo_MenuManager has a Unity UI variant.  Test it out by switching the Source over for each, and assign an element to auto-select.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.