Hello everyone.
I have a problem using UMG, in C++ and in Blueprint, be it on my current project or a new fresh one. I have spent weeks searching forums & the internet and trying stuff on my own, to no avail. It is a seemingly trivial problem that I cannot figure out and it’s driving me insane.
Problem: Drag & Drop of items (Widgets) within a Widget with scroll capability (here, TileView) does not work. The touch is automatically used by the TileView to enable scroll. OnTouchStarted() is not even called on the Item. Drag & Drop of items works when placing the items in a widget that cannot scroll.
Tried solutions: (in no particular order)
- Enable Use Mouse as touch in Editor Preferences.
- Enable Use Mouse as touch in Project Settings.
- Enable touch events in the PlayerController.
- Enable touch over events in the PlayerController.
- Set ConsumeMouseWheel on the TileView to False (touch scroll keeps working).
- Set WheelScrollMultiplier on the TileView to 0 (touch scroll keeps working).
- Set the TileView to IsFocusable = true and its items to IsFocusable = true.
- Set the TileView to IsFocusable = true and its items to IsFocusable = false.
- Set the TileView to IsFocusable = false and its items to IsFocusable = false.
- Set the TileView to IsFocusable = false and its items to IsFocusable = true.
- Set the Priority of the Items to 99.
- Enable the StopAction of the Items.
- Tried to override OnTouchStarted() on the TileView, cannot find it.
- Disable the StopAction of the Items.
- Enable the Return Focus to Selection on the TileView.
- Disable the Return Focus to Selection on the TileView.
- Set the InputMode to InputModeGameAndUi(), InputModeUiOnly(), and InputModeGameOnly().
- Enable Allow Dragging on the TileView.
- Try all combinations of Visibility on the TileView and its Items.
- Transform the Items into Buttons to take advantage of their OnPressed() which is always called when touched.
- Reproduce the problem on an empty project to confirm that the problem comes from Unreal and not from a bug in the project.
- Use the fact that the LongPress of OnTouchGesture is triggered to create an identical widget on top of the TileView that would solely serve to detect the drag & drop event → OnTouchStarted() is not triggered as soon as the widget appears. I have to release and touch it again to finally begin drag, which is not ideal at all.
I don’t have any more idea on what to do. Any help would be greatly appreciated.