Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: markofevil3 on August 04, 2016, 06:20:54 AM
-
Hi!I updated to Unity 5.4 and NGUI 3.10 and found some bugs with DragDropItem.
- Drag speed does not consistent between different screens. It moves faster on Retina devices.
- Sometime OnDragDropRelease and OnDragEnd event does not fire.
Can you fix it please?
-
@ArenMook I've also noticed the same issue with DragDropItem moving too fast on high DPI screens. It does not stay with the cursor and seems to definitely be DPI related. It's not an issue on iPads, but always happens with OSX Retina screens while in the Editor.
@markofevil3, as far as OnDragDropRelease and OnDragEnd not firing, that shouldn't happen unless you are interfering with the collider somehow. Are you disabling the parent or something? Recent versions of NGUI are less tolerant when you do that. Older versions were more tolerant.
-
Just to confirm, the drag and drop moving too fast only happens on retina screens in Unity 5.4 while in the editor?
-
I believe it happened in 5.3 as well. It may happen in other spots (besides the editor) but I only observed it in the editor, myself.
Standalone builds worked fine on the same device.
OS X 10.11.4 (El Capitan) on a MacBook Pro (Retina, 13-inch, Early 2015).
-
I've noticed this problem too.
The further you drag from the original localPosition, the further away from the mouse the dragged item goes.
-
Sounds like Unity may be reporting incorrect screen width and height values. When you do Debug.Log(NGUITools.screenSize), what do you get? Does it match the Stats window?
-
Sorry for the delay on this (I dont normally work on OSX).
The stats window, screen.width/height, and NGUITools.screenSize are all the same consistent value.
-
NGUI 3.10.1 fixed the screen size issue. The issue was in NGUITools.screenSize -- it uses an internal Unity function to get the size of the game view. For some reason during a click, that Unity function reports different values. To "fix" it I just changed it so that it uses Screen.width and height on OSX. It means it won't be accurate anymore when the game view is hidden, but not much else I can do about it. The problem is on Unity's end.