Forum rules - please read before posting.

Inventory Box with Text

Hi everyone,
Hope you are doing well!

Just curious, is it possible to have inventory items that are text? I'm hoping to create a "contacts" list as one of my menus, so I created an inventory category called "Contacts." I then created a Unity UI prefab that contains a grid, similar to the default adventure creator unity prefab for inventory items.

I'm hoping to use the inventory item name as the button's text. So whenever a new contact is picked up, a new item should be added to the grid and this new button's text should be updated.

The adding to the grid is working fine, but I'm unsure about how to change the button's text within AC itself.
Any help is appreciated, thank you!

Comments

  • It's possible. If you set the InventoryBox element's Display type property to Text Only, and make sure that each slot's linked Button has a Text component (either on itself or its child), then AC will automatically set the Text values to the Label properties of the Inventory items it holds.

    If this is already the case but things aren't appearing correct, share screenshots and AC/Unity version numbers and I'll try to see what's wrong.

  • Thanks Chris!
    It seems like it was not actually recognizing Textmesh pro, but things are ok now after I added the TextMeshProIsPresent scripting symbol to the player settings :).

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.