Forum rules - please read before posting.

Inventory Refuses To Drag and Drop

I've come across a strange issue where the inventory simply refuses to allow dragging and dropping of inventory items. The inventory icon doesn't move at all.

Below are my SettingsManager and InventoryManager settings.

I've tried multiple configurations but it won't work for some reason.

I'm using AC 1.86 and Unity 6000.3.11.


I don't have any player, it's essential a 2D First Person (It's an FMV game with looping video clips as the background plates).

The inventory works in terms of a single-click initiating the correct actionlist to play a description of the item etc, but it just won't drag the items at all.

Comments

  • Oh, and I'm working with a Unity UI. I've been trying again all afternoon with no luck :(

  • UPDATE: I got it working. I've no idea what I did (my Managers look the same as before) but it's working now.

  • edited March 28

    Ah, it appears the issue has returned.

    SOMETIMES it works and allows the dragging and dropping and then other times it doesn't, forcing the items to be undraggable and only able to be examined if I right-click on them, rather than the single-left click that works for examining items when the dragging is working. Very strange.

    I'm not sure what could be causing this BUT the dragging and dropping doesn't work at all if using any other aspect ratio than 16:9 or 16:10.

  • Are you using Unity UI or AC for Menu rendering, and what Cursor rendering are you using? Any images of these aspects you can share will help understand the issue.

    The inventory icon doesn't move at all.

    By this, do you mean the icon in the Menu, or the cursor icon? What happens exactly to the cursor?

  • edited March 29

    I'm using Unity UI for all menus and using software rendering for the cursor.

    Here's the 16:9 screen (which sometimes works and sometimes doesn't):

    Here's the 21:9 screen (which doesn't allow dragging at all):

    And here's the inventory UI. I have to manually align the Grid settings to get it to appear centered, even those I'm choosing the centered alignments etc so I'm not sure if that is something to do with it:

    And when I say the inventory icon doesn't move, I mean it doesn't switch the image to the cursor which enables it to be dragged.

    Like I said though, sometimes it DOES allow me to drag it when in 16:9 but sometimes it doesn't. It's all very strange but I'm guessing it's something to do with when it's in 21:9 aspect ratio or above.

    Originally, I tested it by removing the 'navigation' UIs from the scenes in case they were somehow interfering with it but it was still the same.

  • Does your Canvas prefab have the Auto Correct UI Dimensions component on it, to update its RectTransform boundary in reaction to the differing aspect ratios?

    Pause the game in 21:9 and check that the boundary is still correctly surrounding the icons.

    It'd be worth copying over the default Inventory menu from the Default_MenuManager asset into your own Menu Manager to see if that has the same issue. That'll help clarify if it's an issue with the Menu specifically, or something outside of it.

  • I have an Auto-Correct UI Dimensions on the canvas prefab, yes, and it's linked to the main canvas.

    I've paused it in 21:9 and the boundaries and everything resize correctly.

    I tested with the Default_MenuManager and it works as it should, which is clearly suggesting that there's something wrong with my inventory prefab, although what that is I haven't a clue.

    Interestingly enough though, I recreated my inventory menu with an AC inventory menu and it still has the same problem, while the default_MenuManager inventory works. This is very odd.

  • edited March 30

    UPDATE: I've figured out why it's doing what it's doing, although I can't seem to find a remedy and it seems more of a Unity issue than an AC one.

    The inventory UI works completely fine in ALL aspect ratios if I have that navigation menu disabled. The problem is, NOTHING on that menu is blocking any raycasts and it has a lower Sort Order than the inventory, which is confusing me. I initially didn't think that it was causing an issue as I was disabling it in-game but it didn't do anything until I disabled it BEFORE I ran the game. Interesting.

    Is there some kind of sort order that AC uses to override Unity's UIs when displaying multiple menus?

    FIXED: I put the Inventory menu right down to the bottom of the Menu Manager and it worked!

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.