Forum rules - please read before posting.

Drag & Drop not working in 1.79.3... maybe?

Hey Chris,

I hope all is well. Wrapping up a few things in my game here, and I went to create a new iOS build, and I noticed that "Drag and Drop Inventory Interface?" is not working since I updated to 1.79.3.

I'm not entirely certain why this would be... Take a look at the following video for full context.

https://www.loom.com/share/1d16a65252464d088b3499b165c4983c?sid=bbf21ca6-f86d-43f8-802f-373db88a8e25

Am I overlooking something? I feel like I have exhausted all possible combinations of what it could be, checking and unchecking boxes. I even swapped to my desktop managers and switched to drag and drop and the same issue occurs.

I also created an iOS build for my iPhone, and the same issue persist on the phone. You can even do that weird double/triple tap thing to grab an inventory item (like I did in the above video). Even so, it's not consistent.

Any help would be appreciated! Thanks.

  • Jeremy

Comments

  • What version were you updating from?

    The main thing I'm setting the Drag threshold value, under the "Interface" panel in the Settings Manager.

    This represents how far a click/touch has to move, once it begins, for it to be considered a "drag". Setting this to zero will make the drag begin instantly.

  • Thanks for responding. I think I updated from version 1.71.

    So, I did try that -- I set the Drag Threshold to 0 and the problem persists. I also tried duplicating a new Settings Manager from the Demo settings manager, set it up to drag and drop and the issue persists.

    Did something drastic occur from 1.71 to 1.79?

    I look forward to hearing back. Thanks!

  • There were a couple of drag-related fixed in between, but it's too long ago to recall exactly.

    Does this occur if you use - not duplicate - the Demo's Menu Manager, setting the Inventory menu's Source to Unity Ui Prefab? I cannot recreate the issue on my end with this.

    If not, check your Inventory UI's Inspector in the scene at runtime. Are the slot Button components enabled and Interactable?

  • Thanks for the response. Yes; the Demo's Menu Manager does work as intended using Drag and Drop. I do a comparison in this video here:

    https://www.loom.com/share/3a83f5ac7fcb4725939a15b0569b88f0

    Everything in the Demo Menu Manager Inventory and my Inventory are the same. The correct buttons are enabled and interactable. Naturally so, since by doing that weird double-click, I can indeed select and drag an inventory item from the InventoryBox using my menu manager.

    I also thought that maybe other Unity UI menus were interfering with the InventoryBox, due to they're raycast settings and sorting orders and stuff, but I disable all the other Unity UI menus (except for the inventory) while the game was running in the scene hierarchy, and the issue persisted.

    Then, I had another idea to check the EventSystem in the inspector while the game was running and I did that for both your Menu Manager and My Menu Manager, which you can see here:

    https://www.loom.com/share/195e6e8f0d964af68623f9a87d05d310

    I honestly don't see a difference. Not sure if you can pick up on one.

    Whatever the case, I look forward to hearing back. Thanks!

    • Jeremy
  • I couldn't see the top of your own Menu Manager - are you assigning a custom Event System prefab, or are any custom scripts attached to the InventoryUI?

    I think the next logical test is that of the reverse - i.e. copy your own Inventory menu into that of the Demo's (locking the Demo's original first), and see if it works then.

    If so, it's likely due to some other aspect of your own Menu Manager. If not, the updated Demo2D_MenuManager asset file - and your InventoryUI prefab - should be enough for you to PM over for me to take a look at.

  • Thanks again, Chris. No, I don't have a custom Event System prefab. At least, not yet anyways. We may do eventually have a custom Event System if we decide to release on consoles like we did for Dexter Stardust. But for now, it'll just be a Mac, PC, Linux, iOS, and Android release.

    As for your suggestion -- yes. Copying my inventory menu and putting it in the Demo's Menu Manager works. How confusing!

    I spent another hour or so combing over everything it could possibly be. I triple checked the RectTransforms. Nothing. I made it so only my Inventory menu appears OnStart (no other menus in Don't Destroy on Load), and the issue persisted. So, it's not possible that another menu is somehow interfering.

    I'd be happy to send the InventoryUI prefab. Let me know how.

    If this doesn't work, I may have to create a brand new Menu manager and recreate all the menus. Ugh. There are so many :#

    Looking forward to hearing back. Thanks.

  • If this doesn't work, I may have to create a brand new Menu manager and recreate all the menus. Ugh.

    I don't see it coming to that, but I'll need to be able to recreate the issue on my end.

    As copying your Inventory into the Demo works, I'll need your full Menu manager - all UI assets included.

    The easiest way to provide this is to temporarily move all your UI assets - if not already - into their own folder, and then make that folder a sub-folder of your game's "Managers" directory. That way, you can just send me the Managers folder (and included sub-folders).

    You can either do this as a .zip file, or export the folder as a .unitypackage file (uncheck "Include dependencies?" to avoid exporting AC with it.

  • Hello Chris,

    Thanks! I appreciate it. I sent it to hello@adventurecreator.org. I look forward to hearing back from you.

  • Just to tie a bow on this question, since I asked it publicly -- I ended up sharing my entire project with Chris, and he discovered that there was actually no issue with Drag and Drop from an Adventure Creator perspective.

    The issue was this: I have two menus that open when the Inventory opens; the Inventory menu and another menu that has areas that close the Inventory when you drag your cursor out of the Inventory box. They were called "Inventory" and "InventoryHoverClose".

    The "InventoryHoverClose" was absorbing a click/tap and was preventing the item from being dragged out of the Inventory.

    In the menu manager, the "InventoryHoverClose" was above the "Inventory" menu in the manager itself. Chris said that, in AC, menus are processed bottom-to-top in the Menu Manager, so reversing their order fixed it. That means "Inventory" is now above "InventoryHoverClose" in the menu manager order of menus.

    To be clear, I'm using UnityUI for all my menus. So, changing the sorting order in the UnityUI prefabs didn't fix this issue. Changing the order in the AC Menu Manager did fix it.

    Thanks again, Chris!

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.