Forum rules - please read before posting.

Custom Unity UI prefab - issues with inventory shift button

I am making a custom Inventory UI with Unity prefabs and stumbled upon a problem, which I couldn't resolve.

I am selecting items with a single left click and deselecting them with a left click as well. Whenever I have an item selected(it's icon as cursor) and click on the either left or right shifting button the item gets deselected.

I found out that DragState is not even set to DragState.Inventory. I am not sure if this is a AC related issue or if I missed a step in the setup. 

Do I need to implement the state change myself whenever I click on an inventory item? I checked out the pre-existing inventory prefabs AC provides and found no additional scripts.

Comments

  • The DragState should not be set to DragState.Inventory unless you've got Drag and drop Inventory interface? checked in your Settings Manager.

    No additional scripts should be necessary: I've recreated this and it's a bug.  I will look further into it, thank you for posting.
  • Thanks.

    Could you perhaps suggest a temporary solution/patch for this issue? We are currently testing our game and this bug can be a game-breaker. Thanks!
  • I ended up with a simple script on each button that invokes a click action when an inventory item cursor is detected over it for more than X seconds. Works fine as a temporary solution.
  • To fix, try opening PlayerInteraction.cs and find the UpdateInventory method.

    There, replace "IsMouseOverInventory" with "IsEventSystemSelectingObject".
  • This 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.