Forum rules - please read before posting.

Remove Inventory Empty Slots

edited July 2016 in Technical Q&A
I can't seem to figure out how to remove empty slots within the inventory. When viewing the inventory in game, the player can select all 9 slots even if there is no inventory item in said slots. It wouldn't be as bad if I could at least get the empty slots to show the highlighted texture when they are selected, but this does not show up either. The hover sound does play however. Ideally I'd like to either have the empty boxes highlight as you select them or to just not be selectable at all. 

image

image
image

Currently using v1.51

Comments

  • If the highlight texture isn't showing, what makes you say they're being selected?  Is it just that the hover sound is playing?
  • Yeah, you can hear the hover sound as you scroll through all the empty slots. 
  • All right - thanks for posting.  I will try to recreate it, and will let you know if I need more info.
  • Recreated, and will work on a fix.  In the meantime, you can make a temporary fix by opening MenuInventoryBox.cs, and replace:

    if (source != MenuSource.AdventureCreator && uiHideStyle == UIHideStyle.DisableObject)

    with:

    if (uiHideStyle == UIHideStyle.DisableObject)
  • Hey, this is exactly one of the issues I have in my inventory menu in one of my other projects. Empty slots not highlighting but triggering the scroll sound. My menu is uGUI, but I'll give this fix a try too!
  • edited July 2016
    I made the suggested change to MenuInventoryBox.cs but it didn't fix the issue (no difference was seen in game after code change was made). 

    @Alverik, did you have any luck with the temp fix? 
  • edited July 2016
    I've been focusing on a different project so I haven't tried it yet (and I haven't made an inventory in it yet). But, If I can I'll try to check sometime today and report.
  • @witheredCrow: Temporarily switch your Menu's Source to Unity UI Prefab, and check that the When slot is empty setting is set to Disable Object.
  • @ChrisIceBox  that worked! Thanks!
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.