Forum rules - please read before posting.

Unity UI Prefab - Inventory selection bug

I recently added the feature to display the count of an item carrying(if can carry multiple is true) to my perfectly working UI Prefab.
I did this in the same manner as it is for the default Inventory UI generated by AC where every slot has a child object with a text component.
It correctly displays the amount of items if more than one is being held, but I discovered a game braking bug: every item slot is shifted for one index. So if I click on the second one, the third one is selected and so on. But when I mouse over an inventory item, the correct name is displayed.
I didn't find any logical reason so I removed the Text child objects temporarily. Do I have to do this differently with Prefab UI or could this be a bug?

Comments

  • I figured it out. The RectTransform of every Text was not on the right place and since they are raycast targets they can be clicked.

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.