I'm focusing on making a mobile game and I'm trying to make it so a label with the item's name will pop-up when the player touches/selects an item. The label will disappear when player touches the item again or uses the item. What would be the best way to achieve this?
Comments
I'm not done yet!
Know that you can use the Menu Manager to display an InventoryBox that only shows the currently-selected item. Create a new InventoryBox element, and set the Inventory box type field to Display Selected, and Display to Text Only. This will display a label of the currently selected item. It won't be the same label element as your regular Hotspot one, but if that's not an issue, then this should solve it.
Hi Chris. I'm trying to do exactly what 3DMethods wanted to do. I'm working on a Unity UI inventory menu but I also have an alternative AC Inventory just to try things. I disable them by removing the "toggle key" description on the one I don't want to use. I'm using the direct method (no mouse, just keyboard)
The thing is I did this:
"Create a new InventoryBox element, and set the Inventory box type field to Display Selected, and Display to Text Only"
on both inventories. On the AC version I can see the text on the Game window when the game is not running... it displays the name of the first item just fine. But when I run the game, The text doesn't show. I tried also the Unity UI version by assigning a button to display the text but doesn't appear either.
I don't know what I am missing. Maybe some other setting? both inventories work just fine besides this issue.
Well, that's all. Thanks in advance!
Welcome to the community, @3DMethods.
An InventoryBox set to "Display Selected" will only show a single item - the one currently selected, so it won't show anything by default.
This thread is over 10 years old now, and much has changed. It would be best to take things from the top in terms of what you have set up and what you're trying to achieve.
Thanks for the reply. I want to have an Inventory menu with 14 slots containing just the icons of the collected items and one extra text box which displays the name of the selected item so i can navigate the items using the arrow keys and see the item's name on the text box. Its only one text box to display the selected item's name not one text for each slot.
I have an AC inventory menu which I open using the "X" key, I added on/off actionlists to change the music while its open.
I also have a Unity UI menu which I did using canvas, panel and buttons without texts and on, off, onInstant and Offintant animations and also two Image component animations triggered by an event on the canvas on and off animations.
The thing I'm struggling with is making this text box to diplay the selected item's name. I tried the method I mentioned on my previous message with both Inventories. The first item on my inventory its called "strange Device" and its automatically selected when I open the menu. No text appear on the InventoryBox. I navigate through the menu... nothing. I can see the text "strange device" on the game window when I'm not running the game but when I run it... no text.
Let me know if there's any additional info you need and thanks again.
As this is a visual issue, any screenshots you can share will help clarify the situation.
What are your AC/Unity versions, also?
Leave your InventoryBox element set to display "Icon Only" - if you set it to Text, it'll show the text for all items.
For showing only the text of the selected item, you want to use the Hotspot label/menu, which will show the text of the selected/hovered item provided that the Menu it is stored in is underneath that of the Inventory in the Menu Manager. This should be the case with the default UI, however.
Where do you want the selected item's name to be displayed? Under the item itself, or in a fixed position?
Hi Chris, I did the Hotspot label/menu thing and worked just fine. I linked the label to a text box from my Unity UI menu.
Thanks a lot!
I have other doubt I don't know if I should start a new thread for it.
Briefly: I'm using direct movement. Cursor icons appear on the center of the screen. Can I move them to other (permanent) location?
Where do you want them to move to - or do you want them hidden? You can configure their visibility in the Cursor Manager.